]> git.saurik.com Git - apple/file_cmds.git/blobdiff - stat/stat.c
file_cmds-321.100.10.0.1.tar.gz
[apple/file_cmds.git] / stat / stat.c
index 095900e7190a5ffb45ce6f3df999b8d65a3fe2ff..610eff94d732e87e01652a40196fa77cd51c5d2f 100644 (file)
@@ -731,7 +731,14 @@ format1(const struct stat *st,
                small = (sizeof(st->st_flags) == 4);
                data = st->st_flags;
                sdata = NULL;
-               formats = FMTF_DECIMAL | FMTF_OCTAL | FMTF_UNSIGNED | FMTF_HEX;
+               formats = FMTF_DECIMAL | FMTF_OCTAL | FMTF_UNSIGNED | FMTF_HEX |
+                       FMTF_STRING;
+               if (ofmt == FMTF_STRING) {
+                       small = 0;
+                       data = 0;
+                       snprintf(path, sizeof(path), "%s", fflagstostr(st->st_flags));
+                       sdata = path;
+               }
                if (ofmt == 0)
                        ofmt = FMTF_UNSIGNED;
                break;