summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorLeon Woestenberg <leon.woestenberg@gmail.com>2007-08-20 18:01:18 +0000
committerLeon Woestenberg <leon.woestenberg@gmail.com>2007-08-20 18:01:18 +0000
commit9d597549a657275f5a38d4441d0fb164283e2181 (patch)
treeea9fec7c0ca81d7784422ca0e7078058cf20e30d /packages
parentde542fe9877144b7e0bd5226e0a3841887ce6c89 (diff)
parentd89e27e308b8755528b07b77026a0ce4fb619391 (diff)
merge of '9f877480867cc9cabebff8145a336b76f7a0f58d'
and 'b396aa55286b5d00bbc2fba14ef9dd30b82a3af9'
Diffstat (limited to 'packages')
-rw-r--r--packages/makedevs/makedevs-1.0.0/makedevs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/makedevs/makedevs-1.0.0/makedevs.c b/packages/makedevs/makedevs-1.0.0/makedevs.c
index a9bf8e782a..14569c61a2 100644
--- a/packages/makedevs/makedevs-1.0.0/makedevs.c
+++ b/packages/makedevs/makedevs-1.0.0/makedevs.c
@@ -106,6 +106,7 @@ static char *xstrdup(const char *s)
static void add_new_directory(char *name, char *path,
unsigned long uid, unsigned long gid, unsigned long mode)
{
+ mkdir(path,mode);
// printf("Directory: %s %s UID: %ld GID %ld MODE: %ld\n", path, name, uid, gid, mode);
}
@@ -136,6 +137,13 @@ static void add_new_device(char *name, char *path, unsigned long uid,
static void add_new_file(char *name, char *path, unsigned long uid,
unsigned long gid, unsigned long mode)
{
+ int fd = open(path,O_CREAT | O_WRONLY, mode);
+ if(fd<0)
+ {
+ error_msg_and_die("%s: file can not be created!", path);
+ } else {
+ close(fd);
+ }
// printf("File: %s %s UID: %ld GID: %ld MODE: %ld\n",
// path, name, gid, uid, mode);
}