diff options
author | lum <lum@cvs.openbsd.org> | 2013-05-30 04:17:26 +0000 |
---|---|---|
committer | lum <lum@cvs.openbsd.org> | 2013-05-30 04:17:26 +0000 |
commit | a2fb983c7538eb1b7d93312b0b78fe9a6f40652d (patch) | |
tree | 02ee23b93ebfa5c83d0fd35a1db78c22acc9b5df /usr.bin/mg/dir.c | |
parent | 0320d60443aaba16d54fb38a5e60729174532605 (diff) |
Reuse the makedir() function in dir.c for dired's
dired-create-directory command.
ok jasper@
Diffstat (limited to 'usr.bin/mg/dir.c')
-rw-r--r-- | usr.bin/mg/dir.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/mg/dir.c b/usr.bin/mg/dir.c index 31efea90277..e1a6fe6d629 100644 --- a/usr.bin/mg/dir.c +++ b/usr.bin/mg/dir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dir.c,v 1.22 2013/05/18 11:23:29 lum Exp $ */ +/* $OpenBSD: dir.c,v 1.23 2013/05/30 04:17:25 lum Exp $ */ /* This file is in the public domain. */ @@ -83,6 +83,13 @@ getcwdir(char *buf, size_t len) int makedir(int f, int n) { + return (do_makedir()); +} + +int +do_makedir(void) +{ + struct stat sb; int finished, ishere; mode_t dir_mode, mode, oumask; |