flag
This commit is contained in:
16
flag.c
16
flag.c
@@ -39,6 +39,7 @@ static void flag_help(void)
|
||||
fprintf(stdout, "USAGE: FLAG [path [ option | [+|-] attribute(s) ] [SUB]]\n");
|
||||
fprintf(stdout, "\n");
|
||||
fprintf(stdout, "386 Attributes:\n");
|
||||
fprintf(stdout, "--------------\n");
|
||||
fprintf(stdout, "\n");
|
||||
fprintf(stdout, "RO Read Only\n");
|
||||
fprintf(stdout, "RW Read Write\n");
|
||||
@@ -111,14 +112,21 @@ static int flag_attr_mask(char *s, unsigned *setbits, unsigned *clearbits)
|
||||
|
||||
static void flag_print_attrs(unsigned attr)
|
||||
{
|
||||
/*
|
||||
* Novell FLAG display order is not the same as help order.
|
||||
* Observed output:
|
||||
* [ Rw - A H Sy - -- -- -- -- DI RI ]
|
||||
* Order:
|
||||
* RO/RW, S, A, H, Sy, T, P, RA, WA, CI, DI, RI
|
||||
*/
|
||||
fprintf(stdout, "[ ");
|
||||
fprintf(stdout, "%s ", (attr & _A_RDONLY) ? "RO" : "Rw");
|
||||
fprintf(stdout, "- "); /* S Shareable */
|
||||
fprintf(stdout, "%c ", (attr & _A_ARCH) ? 'A' : '-');
|
||||
fprintf(stdout, "%c ", (attr & _A_HIDDEN) ? 'H' : '-');
|
||||
fprintf(stdout, "%s ", (attr & _A_SYSTEM) ? "Sy" : "-");
|
||||
fprintf(stdout, "- "); /* T */
|
||||
fprintf(stdout, "- "); /* P */
|
||||
fprintf(stdout, "%c ", (attr & _A_ARCH) ? 'A' : '-');
|
||||
fprintf(stdout, "-- "); /* P */
|
||||
fprintf(stdout, "-- "); /* RA */
|
||||
fprintf(stdout, "-- "); /* WA */
|
||||
fprintf(stdout, "-- "); /* CI */
|
||||
@@ -194,7 +202,9 @@ static int flag_apply(char *pattern, unsigned setbits, unsigned clearbits)
|
||||
attr = newattr;
|
||||
}
|
||||
|
||||
/* Novell FLAG prints the resulting file entry after a change command. */
|
||||
/*
|
||||
* Novell FLAG prints the resulting file entry after the command.
|
||||
*/
|
||||
flag_display_one(fname, attr);
|
||||
shown++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user