Fix JSON export of "otherfs" excluded type

Corresponds to 08d373881c on the zig
branch.
This commit is contained in:
Yorhel 2024-07-24 10:40:43 +02:00
parent ed7c5b2b93
commit 88c9b8718e
2 changed files with 2 additions and 3 deletions

View file

@ -108,7 +108,6 @@ static void output_info(struct dir *d, const char *name, struct dir_ext *e, unsi
output_int(e->mtime); output_int(e->mtime);
} }
/* TODO: Including the actual number of links would be nicer. */
if(d->flags & FF_HLNKC) { if(d->flags & FF_HLNKC) {
fputs(",\"ino\":", stream); fputs(",\"ino\":", stream);
output_int(d->ino); output_int(d->ino);
@ -123,7 +122,7 @@ static void output_info(struct dir *d, const char *name, struct dir_ext *e, unsi
if(d->flags & FF_EXL) if(d->flags & FF_EXL)
fputs(",\"excluded\":\"pattern\"", stream); fputs(",\"excluded\":\"pattern\"", stream);
else if(d->flags & FF_OTHFS) else if(d->flags & FF_OTHFS)
fputs(",\"excluded\":\"othfs\"", stream); fputs(",\"excluded\":\"otherfs\"", stream);
else if(d->flags & FF_KERNFS) else if(d->flags & FF_KERNFS)
fputs(",\"excluded\":\"kernfs\"", stream); fputs(",\"excluded\":\"kernfs\"", stream);
else if(d->flags & FF_FRMLNK) else if(d->flags & FF_FRMLNK)

View file

@ -490,7 +490,7 @@ static int iteminfo(void) {
C(rlit("false", 5)); C(rlit("false", 5));
} else if(strcmp(ctx->val, "excluded") == 0) { /* excluded */ } else if(strcmp(ctx->val, "excluded") == 0) { /* excluded */
C(rstring(ctx->val, 8)); C(rstring(ctx->val, 8));
if(strcmp(ctx->val, "otherfs") == 0) if(strcmp(ctx->val, "otherfs") == 0 || strcmp(ctx->val, "othfs") == 0)
ctx->buf_dir->flags |= FF_OTHFS; ctx->buf_dir->flags |= FF_OTHFS;
else if(strcmp(ctx->val, "kernfs") == 0) else if(strcmp(ctx->val, "kernfs") == 0)
ctx->buf_dir->flags |= FF_KERNFS; ctx->buf_dir->flags |= FF_KERNFS;