vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Ah, understand. What exactly is this incompatible with? And where can I find these standards on the web? I am working on at least one other patch, for touch, however there isn't much point if it's incompatible and therefore won't be accepted. On 4/21/05, Theo de Raadt <deraadt@cvs.openbsd.org> wrote: > This is a bad idea. > > It is an incompatible extension. > > Then people use it in scripts. > > Then their scripts become non-portable. > > > Here is a patch for mkdir to add in a -i <mode> option to specify the > > mode of intermediate directories when using -p. This would come in > > very handy for me, don't know if anyone else would even want this, but > > didn't take long to write. > > > > Index: mkdir.c > > ================================================== ================= > > RCS file: /home/cvs/src/bin/mkdir/mkdir.c,v > > retrieving revision 1.17 > > diff -u -r1.17 mkdir.c > > --- mkdir.c 1 Jul 2004 18:25:47 -0000 1.17 > > +++ mkdir.c 21 Apr 2005 20:43:55 -0000 > > @@ -79,7 +79,7 @@ > > dir_mode = mode | S_IWUSR | S_IXUSR; > > > > pflag = 0; > > - while ((ch = getopt(argc, argv, "m > > + while ((ch = getopt(argc, argv, "i:m > > switch(ch) { > > case 'p': > > pflag = 1; > > @@ -90,6 +90,12 @@ > > mode = getmode(set, S_IRWXU | S_IRWXG | S_IRWXO); > > free(set); > > break; > > + case 'i': > > + if ((set = setmode(optarg)) == NULL) > > + errx(1, "invalid file mode: %s", optarg); > > + dir_mode = getmode(set, S_IRWXU | S_IRWXG | S_IRWXO); > > + free(set); > > + break; > > default: > > usage(); > > } > > @@ -175,6 +181,6 @@ > > void > > usage(void) > > { > > - (void)fprintf(stderr, "usage: %s [-p] [-m mode] dirname > > ...\n", __progname); > > + (void)fprintf(stderr, "usage: %s [-p] [-m mode] [-i imode] > > dirname ...\n", __progname); > > exit(1); > > } |
| Thread Tools | |
| Display Modes | |
|
|