Changeset View
Changeset View
Standalone View
Standalone View
head/bin/chmod/chmod.c
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | while ((ch = getopt(argc, argv, "HLPRXfghorstuvwx")) != -1) | ||||
case 'R': | case 'R': | ||||
Rflag = 1; | Rflag = 1; | ||||
break; | break; | ||||
case 'f': | case 'f': | ||||
fflag = 1; | fflag = 1; | ||||
break; | break; | ||||
case 'h': | case 'h': | ||||
/* | /* | ||||
* In System V (and probably POSIX.2) the -h option | * In System V the -h option causes chmod to change | ||||
* causes chmod to change the mode of the symbolic | * the mode of the symbolic link. 4.4BSD's symbolic | ||||
* link. 4.4BSD's symbolic links didn't have modes, | * links didn't have modes, so it was an undocumented | ||||
* so it was an undocumented noop. In FreeBSD 3.0, | * noop. In FreeBSD 3.0, lchmod(2) is introduced and | ||||
* lchmod(2) is introduced and this option does real | * this option does real work. | ||||
* work. | |||||
*/ | */ | ||||
hflag = 1; | hflag = 1; | ||||
break; | break; | ||||
/* | /* | ||||
* XXX | * XXX | ||||
* "-[rwx]" are valid mode commands. If they are the entire | * "-[rwx]" are valid mode commands. If they are the entire | ||||
* argument, getopt has moved past them, so decrement optind. | * argument, getopt has moved past them, so decrement optind. | ||||
* Regardless, we're done argument processing. | * Regardless, we're done argument processing. | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |