Skip to content

Commit bbcc58b

Browse files
committed
Resequence exit codes in jparse/util
It appears that this was not done or something went wrong when doing so (as running make seqcexit updated the exit codes and this comes from after running it in jparse/ and committing and then syncing from jparse to jparse/). Also as an update to the previous commit with the minor fix and improvement to mkiocccentry -y and -Y warnings, I meant to update the MKIOCCCENTRY_VERSION in the CHANGES.md; it is now "1.2.36 2025-02-28".
1 parent 3776473 commit bbcc58b

File tree

3 files changed

+143
-295
lines changed

3 files changed

+143
-295
lines changed

CHANGES.md

+6
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,14 @@ caution.
1414
It is hoped this is the last update to `mkiocccentry(1)` prior to the soft code
1515
freeze today.
1616

17+
Update `MKIOCCCENTRY_VERSION` to `"1.2.36 2025-02-28"`.
18+
1719
TODO: finish work on the `chkentry_test.sh` script.
1820

21+
Resequence exit codes in `jparse/util.c`. It appears that this was not done or
22+
something went wrong when doing so (as running `make seqcexit` updated the exit
23+
codes and this comes from after running it in `jparse/` and committing and then
24+
syncing from `jparse` to `jparse/`).
1925

2026

2127
## Release 2.3.44 2025-02-27

jparse/util.c

+28-28
Original file line numberDiff line numberDiff line change
@@ -11271,7 +11271,7 @@ main(int argc, char **argv)
1127111271
fts.max_depth = 5;
1127211272
paths_found = find_paths(paths, "test_jparse", -1, &cwd, false, &fts);
1127311273
if (paths_found == NULL) {
11274-
err(208, __func__, "didn't find any paths in the paths array");
11274+
err(210, __func__, "didn't find any paths in the paths array");
1127511275
not_reached();
1127611276
}
1127711277

@@ -11285,7 +11285,7 @@ main(int argc, char **argv)
1128511285
/* get next string pointer */
1128611286
name = dyn_array_value(paths_found, char *, j);
1128711287
if (name == NULL) { /* paranoia */
11288-
err(209, __func__, "found NULL pointer at paths_found[%ju]", (uintmax_t)j);
11288+
err(211, __func__, "found NULL pointer at paths_found[%ju]", (uintmax_t)j);
1128911289
not_reached();
1129011290
}
1129111291

@@ -11332,7 +11332,7 @@ main(int argc, char **argv)
1133211332
fts.max_depth = 3;
1133311333
paths_found = find_paths(paths, "test_jparse", -1, &cwd, false, &fts);
1133411334
if (paths_found == NULL) {
11335-
err(208, __func__, "didn't find any paths in the paths array");
11335+
err(212, __func__, "didn't find any paths in the paths array");
1133611336
not_reached();
1133711337
}
1133811338

@@ -11346,7 +11346,7 @@ main(int argc, char **argv)
1134611346
/* get next string pointer */
1134711347
name = dyn_array_value(paths_found, char *, j);
1134811348
if (name == NULL) { /* paranoia */
11349-
err(209, __func__, "found NULL pointer at paths_found[%ju]", (uintmax_t)j);
11349+
err(213, __func__, "found NULL pointer at paths_found[%ju]", (uintmax_t)j);
1135011350
not_reached();
1135111351
}
1135211352

@@ -11395,7 +11395,7 @@ main(int argc, char **argv)
1139511395
fts.max_depth = 0;
1139611396
paths_found = find_paths(paths, "test_jparse", -1, &cwd, false, &fts);
1139711397
if (paths_found == NULL) {
11398-
err(208, __func__, "didn't find any paths in the paths array");
11398+
err(214, __func__, "didn't find any paths in the paths array");
1139911399
not_reached();
1140011400
}
1140111401

@@ -11409,7 +11409,7 @@ main(int argc, char **argv)
1140911409
/* get next string pointer */
1141011410
name = dyn_array_value(paths_found, char *, j);
1141111411
if (name == NULL) { /* paranoia */
11412-
err(209, __func__, "found NULL pointer at paths_found[%ju]", (uintmax_t)j);
11412+
err(215, __func__, "found NULL pointer at paths_found[%ju]", (uintmax_t)j);
1141311413
not_reached();
1141411414
}
1141511415

@@ -11460,7 +11460,7 @@ main(int argc, char **argv)
1146011460
fts.max_depth = 3;
1146111461
paths_found = find_paths(paths, "test_jparse", -1, &cwd, false, &fts);
1146211462
if (paths_found != NULL) {
11463-
err(208, __func__, "bogus range of min/max directories found directories");
11463+
err(216, __func__, "bogus range of min/max directories found directories");
1146411464
not_reached();
1146511465
}
1146611466

@@ -11489,7 +11489,7 @@ main(int argc, char **argv)
1148911489
fts.match_case = true;
1149011490
paths_found = find_paths(paths, "test_jparse", -1, &cwd, false, &fts);
1149111491
if (paths_found != NULL) {
11492-
err(210, __func__, "found unexpected socket under test_jparse/");
11492+
err(217, __func__, "found unexpected socket under test_jparse/");
1149311493
not_reached();
1149411494
}
1149511495

@@ -11521,7 +11521,7 @@ main(int argc, char **argv)
1152111521
fts.match_case = true;
1152211522
paths_found = find_paths(paths, "test_jparse", -1, &cwd, false, &fts);
1152311523
if (paths_found != NULL) {
11524-
err(211, __func__, "found unexpected character device under test_jparse/");
11524+
err(218, __func__, "found unexpected character device under test_jparse/");
1152511525
not_reached();
1152611526
}
1152711527

@@ -11554,7 +11554,7 @@ main(int argc, char **argv)
1155411554
fts.match_case = true;
1155511555
paths_found = find_paths(paths, "test_jparse", -1, &cwd, false, &fts);
1155611556
if (paths_found != NULL) {
11557-
err(212, __func__, "found unexpected block device under test_jparse/");
11557+
err(219, __func__, "found unexpected block device under test_jparse/");
1155811558
not_reached();
1155911559
}
1156011560

@@ -11581,7 +11581,7 @@ main(int argc, char **argv)
1158111581
fts.match_case = false;
1158211582
paths_found = find_paths(paths, "test_jparse", -1, &cwd, false, &fts);
1158311583
if (paths_found != NULL) {
11584-
err(213, __func__, "found unexpected FIFO under test_jparse/");
11584+
err(220, __func__, "found unexpected FIFO under test_jparse/");
1158511585
not_reached();
1158611586
}
1158711587

@@ -11621,15 +11621,15 @@ main(int argc, char **argv)
1162111621
for (j = 0; j < len; ++j) {
1162211622
name = dyn_array_value(paths_found, char *, j);
1162311623
if (name == NULL) {
11624-
err(214, __func__, "found NULL pointer in paths_found (not file, directory or symlink) array");
11624+
err(221, __func__, "found NULL pointer in paths_found (not file, directory or symlink) array");
1162511625
not_reached();
1162611626
}
1162711627
warn(__func__, "path is not a file, directory or symlink: %s", name);
1162811628
}
1162911629
/*
1163011630
* make it an error
1163111631
*/
11632-
err(215, __func__, "found unexpected file type under test_jparse/");
11632+
err(222, __func__, "found unexpected file type under test_jparse/");
1163311633
not_reached();
1163411634
}
1163511635

@@ -11669,7 +11669,7 @@ main(int argc, char **argv)
1166911669
relpath = "foobar";
1167011670
touch(relpath, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
1167111671
if (!exists(relpath)) {
11672-
err(216, __func__, "file %s does not exist after touch()", relpath);
11672+
err(223, __func__, "file %s does not exist after touch()", relpath);
1167311673
not_reached();
1167411674
}
1167511675

@@ -11693,17 +11693,17 @@ main(int argc, char **argv)
1169311693
for (j = 0; j < len; ++j) {
1169411694
name = dyn_array_value(paths_found, char *, j);
1169511695
if (name == NULL) {
11696-
err(217, __func__, "found NULL pointer in paths_found (any) array");
11696+
err(224, __func__, "found NULL pointer in paths_found (any) array");
1169711697
not_reached();
1169811698
}
1169911699
if (strcmp(relpath, name) != 0) {
11700-
err(218, __func__, "found non-matching file in list: %s != %s", name, relpath);
11700+
err(225, __func__, "found non-matching file in list: %s != %s", name, relpath);
1170111701
not_reached();
1170211702
}
1170311703
fdbg(stderr, DBG_MED, "found file %s as case-sensitive search", name);
1170411704
}
1170511705
} else {
11706-
err(219, __func__, "couldn't find any file called \"%s\" as case-sensitive search", relpath);
11706+
err(226, __func__, "couldn't find any file called \"%s\" as case-sensitive search", relpath);
1170711707
not_reached();
1170811708
}
1170911709

@@ -11742,18 +11742,18 @@ main(int argc, char **argv)
1174211742
for (j = 0; j < len; ++j) {
1174311743
name = dyn_array_value(paths_found, char *, j);
1174411744
if (name == NULL) {
11745-
err(220, __func__, "found NULL pointer in paths_found (any) array");
11745+
err(227, __func__, "found NULL pointer in paths_found (any) array");
1174611746
not_reached();
1174711747
}
1174811748
if (strcasecmp(relpath, name) != 0) {
11749-
err(221, __func__, "found non-matching file in list: %s != %s", name, relpath);
11749+
err(228, __func__, "found non-matching file in list: %s != %s", name, relpath);
1175011750
not_reached();
1175111751
}
1175211752

1175311753
fdbg(stderr, DBG_MED, "found %s by case-insensitive search", name);
1175411754
}
1175511755
} else {
11756-
err(222, __func__, "couldn't find any file called \"%s\" by case-insensitive search", relpath);
11756+
err(229, __func__, "couldn't find any file called \"%s\" by case-insensitive search", relpath);
1175711757
not_reached();
1175811758
}
1175911759

@@ -11763,7 +11763,7 @@ main(int argc, char **argv)
1176311763
errno = 0; /* pre-clear errno for errp() */
1176411764
if (unlink(relpath) != 0) {
1176511765
if (errno != ENOENT) {
11766-
errp(223, __func__, "unable to delete file %s", relpath);
11766+
errp(230, __func__, "unable to delete file %s", relpath);
1176711767
not_reached();
1176811768
}
1176911769
} else {
@@ -11805,7 +11805,7 @@ main(int argc, char **argv)
1180511805
* make sure it exists
1180611806
*/
1180711807
if (!exists(relpath)) {
11808-
err(224, __func__, "file %s does not exist", relpath);
11808+
err(231, __func__, "file %s does not exist", relpath);
1180911809
not_reached();
1181011810
}
1181111811

@@ -11843,7 +11843,7 @@ main(int argc, char **argv)
1184311843
for (j = 0; j < len; ++j) {
1184411844
name = dyn_array_value(paths_found, char *, j);
1184511845
if (name == NULL) {
11846-
err(225, __func__, "found NULL pointer in paths_found (any) array");
11846+
err(232, __func__, "found NULL pointer in paths_found (any) array");
1184711847
not_reached();
1184811848
}
1184911849
fdbg(stderr, DBG_MED, "found file %s as case-sensitive search", name);
@@ -11892,11 +11892,11 @@ main(int argc, char **argv)
1189211892
for (j = 0; j < len; ++j) {
1189311893
name = dyn_array_value(paths_found, char *, j);
1189411894
if (name == NULL) {
11895-
err(226, __func__, "found NULL pointer in paths_found array");
11895+
err(233, __func__, "found NULL pointer in paths_found array");
1189611896
not_reached();
1189711897
}
1189811898
if (strcasecmp(relpath, name) != 0) {
11899-
err(227, __func__, "found non-matching file: %s != %s", name, relpath);
11899+
err(234, __func__, "found non-matching file: %s != %s", name, relpath);
1190011900
not_reached();
1190111901
}
1190211902
fdbg(stderr, DBG_MED, "found %s by case-insensitive search", name);
@@ -11905,7 +11905,7 @@ main(int argc, char **argv)
1190511905
/*
1190611906
* as it is a case-insensitive it should always succeed
1190711907
*/
11908-
err(228, __func__, "couldn't find any file called %s by case-insensitive search", relpath);
11908+
err(235, __func__, "couldn't find any file called %s by case-insensitive search", relpath);
1190911909
not_reached();
1191011910
}
1191111911

@@ -11935,7 +11935,7 @@ main(int argc, char **argv)
1193511935
free(fname);
1193611936
fname = NULL;
1193711937
} else {
11938-
err(229, __func__, "couldn't find %s in tree", relpath);
11938+
err(236, __func__, "couldn't find %s in tree", relpath);
1193911939
not_reached();
1194011940
}
1194111941

@@ -11946,7 +11946,7 @@ main(int argc, char **argv)
1194611946
errno = 0; /* pre-clear errno for errp() */
1194711947
if (unlink(relpath) != 0) {
1194811948
if (errno != ENOENT) {
11949-
errp(230, __func__, "unable to delete file %s", relpath);
11949+
errp(237, __func__, "unable to delete file %s", relpath);
1195011950
not_reached();
1195111951
}
1195211952
} else {

0 commit comments

Comments
 (0)