Changeset 2536
- Timestamp:
- 04/27/07 11:01:20 (2 years ago)
- Files:
-
- trunk/src/chroot-sh.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/chroot-sh.c
r2407 r2536 193 193 } 194 194 195 static int 196 execLink(int argc, char *argv[]) 197 { 198 int res = EXIT_SUCCESS; 199 200 if (argc!=3) { 201 WRITE_MSG(2, "Need exactly two files for 'link' operation; try '--help' for more information\n"); 202 return wrapper_exit_code; 203 } 204 205 if (symlink(argv[1], argv[2])==-1) { 206 PERROR_Q(ENSC_WRAPPERS_PREFIX "link", argv[1]); 207 res = EXIT_FAILURE; 208 } 209 210 return res; 211 } 212 195 213 static struct Command { 196 214 char const *cmd; … … 204 222 { "mkdir", execMkdir }, 205 223 { "chmod", execChmod }, 224 { "link", execLink }, 206 225 { 0,0 } 207 226 }; … … 225 244 " mkdir <file>+ ... create the given directories\n" 226 245 " chmod <mode> <file>+\n" 227 " ... change access permissions of files\n\n" 246 " ... change access permissions of files\n" 247 " link <src> dst> ... create a symbolic link from <src> to <dst>\n\n" 228 248 "Please report bugs to " PACKAGE_BUGREPORT "\n"); 229 249 exit(0);
