summaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>1999-10-22 18:18:31 +0000
committerEric Andersen <andersen@codepoet.org>1999-10-22 18:18:31 +0000
commitfa0540fb091625499b90285bafa061c665e0c636 (patch)
treeb0a130e8b224f980f1ea234c0d1d47590ebe748c /utility.c
parent8eefd021ca7a0b14e46e6bbff2d885ca9da0ea96 (diff)
downloadbusybox-w32-fa0540fb091625499b90285bafa061c665e0c636.tar.gz
busybox-w32-fa0540fb091625499b90285bafa061c665e0c636.tar.bz2
busybox-w32-fa0540fb091625499b90285bafa061c665e0c636.zip
Make mkdir -m work
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/utility.c b/utility.c
index a653bb325..421492dca 100644
--- a/utility.c
+++ b/utility.c
@@ -540,11 +540,9 @@ parse_mode( const char* s, mode_t* theMode)
540 groups |= S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO; 540 groups |= S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO;
541 break; 541 break;
542 default: 542 default:
543 if ( isdigit(c) && c >= '0' && c <= '7' && mode == 0 && groups == 0 ) { 543 if ( isdigit(c) && c >= '0' && c <= '7' &&
544 andMode = 0; 544 mode == 0 && groups == 0 ) {
545 orMode = strtol(--s, NULL, 8); 545 *theMode = strtol(--s, NULL, 8);
546 *theMode &= andMode;
547 *theMode |= orMode;
548 return (TRUE); 546 return (TRUE);
549 } 547 }
550 else 548 else