summaryrefslogtreecommitdiffstats
path: root/meta/packages/makedevs/makedevs-1.0.0/makedevs.c
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/makedevs/makedevs-1.0.0/makedevs.c')
-rw-r--r--meta/packages/makedevs/makedevs-1.0.0/makedevs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/packages/makedevs/makedevs-1.0.0/makedevs.c b/meta/packages/makedevs/makedevs-1.0.0/makedevs.c
index a9bf8e782a..14569c61a2 100644
--- a/meta/packages/makedevs/makedevs-1.0.0/makedevs.c
+++ b/meta/packages/makedevs/makedevs-1.0.0/makedevs.c
@@ -106,6 +106,7 @@ static char *xstrdup(const char *s)
106static void add_new_directory(char *name, char *path, 106static void add_new_directory(char *name, char *path,
107 unsigned long uid, unsigned long gid, unsigned long mode) 107 unsigned long uid, unsigned long gid, unsigned long mode)
108{ 108{
109 mkdir(path,mode);
109// printf("Directory: %s %s UID: %ld GID %ld MODE: %ld\n", path, name, uid, gid, mode); 110// printf("Directory: %s %s UID: %ld GID %ld MODE: %ld\n", path, name, uid, gid, mode);
110} 111}
111 112
@@ -136,6 +137,13 @@ static void add_new_device(char *name, char *path, unsigned long uid,
136static void add_new_file(char *name, char *path, unsigned long uid, 137static void add_new_file(char *name, char *path, unsigned long uid,
137 unsigned long gid, unsigned long mode) 138 unsigned long gid, unsigned long mode)
138{ 139{
140 int fd = open(path,O_CREAT | O_WRONLY, mode);
141 if(fd<0)
142 {
143 error_msg_and_die("%s: file can not be created!", path);
144 } else {
145 close(fd);
146 }
139// printf("File: %s %s UID: %ld GID: %ld MODE: %ld\n", 147// printf("File: %s %s UID: %ld GID: %ld MODE: %ld\n",
140// path, name, gid, uid, mode); 148// path, name, gid, uid, mode);
141} 149}