Changeset f215bb5 in mainline
- Timestamp:
- 2011-07-27T21:24:32Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fd4b636
- Parents:
- 77c6698
- Location:
- uspace/lib/posix
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/ctype.c
r77c6698 rf215bb5 94 94 int posix_isprint(int c) 95 95 { 96 return posix_isa csii(c) && !posix_iscntrl(c);96 return posix_isascii(c) && !posix_iscntrl(c); 97 97 } 98 98 -
uspace/lib/posix/fnmatch.c
r77c6698 rf215bb5 525 525 static char *_casefold(const char *s) 526 526 { 527 assert(s != NULL); 527 528 char *result = strdup(s); 528 529 for (char *i = result; *i != '\0'; ++i) { … … 542 543 int posix_fnmatch(const char *pattern, const char *string, int flags) 543 544 { 545 assert(pattern != NULL); 546 assert(string != NULL); 547 544 548 // TODO: don't fold everything in advance, but only when needed 545 549 -
uspace/lib/posix/pwd.c
r77c6698 rf215bb5 39 39 #include "errno.h" 40 40 41 // TODO: documentation42 43 41 static bool entry_read = false; 44 42 … … 46 44 static const struct posix_passwd dummy_pwd = { 47 45 .pw_name = (char *) "user", 48 .pw_uid = 1,49 .pw_gid = 1,46 .pw_uid = 0, 47 .pw_gid = 0, 50 48 .pw_dir = (char *) "/", 51 49 .pw_shell = (char *) "/app/bdsh" … … 115 113 { 116 114 assert(name != NULL); 115 assert(pwd != NULL); 116 assert(buffer != NULL); 117 assert(result != NULL); 117 118 118 119 if (posix_strcmp(name, "user") != 0) { … … 121 122 } 122 123 123 return posix_getpwuid_r( 1, pwd, buffer, bufsize, result);124 return posix_getpwuid_r(0, pwd, buffer, bufsize, result); 124 125 } 125 126 … … 132 133 struct posix_passwd *posix_getpwuid(posix_uid_t uid) 133 134 { 134 if (uid != 1) {135 if (uid != 0) { 135 136 return NULL; 136 137 } … … 159 160 '/', '\0', 'b', 'd', 's', 'h', '\0' }; 160 161 161 if (uid != 1) {162 if (uid != 0) { 162 163 *result = NULL; 163 164 return 0; … … 171 172 172 173 pwd->pw_name = (char *) bf; 173 pwd->pw_uid = 1;174 pwd->pw_gid = 1;174 pwd->pw_uid = 0; 175 pwd->pw_gid = 0; 175 176 pwd->pw_dir = (char *) bf + 5; 176 177 pwd->pw_shell = (char *) bf + 7; -
uspace/lib/posix/pwd.h
r77c6698 rf215bb5 35 35 #ifndef POSIX_PWD_H_ 36 36 #define POSIX_PWD_H_ 37 38 // TODO: documentation39 37 40 38 #include "sys/types.h" -
uspace/lib/posix/signal.c
r77c6698 rf215bb5 66 66 67 67 /** 68 * 69 * @param signo 68 * Default signal handler. Executes the default action for each signal, 69 * as reasonable within HelenOS. 70 * 71 * @param signo Signal number. 70 72 */ 71 73 void __posix_default_signal_handler(int signo) … … 75 77 abort(); 76 78 case SIGQUIT: 77 fprintf(stderr, "Quit signal raised. Exiting. ");79 fprintf(stderr, "Quit signal raised. Exiting.\n"); 78 80 exit(EXIT_FAILURE); 79 81 case SIGINT: 80 fprintf(stderr, "Interrupt signal caught. Exiting. ");82 fprintf(stderr, "Interrupt signal caught. Exiting.\n"); 81 83 exit(EXIT_FAILURE); 82 84 case SIGTERM: 83 fprintf(stderr, "Termination signal caught. Exiting. ");85 fprintf(stderr, "Termination signal caught. Exiting.\n"); 84 86 exit(EXIT_FAILURE); 85 87 case SIGSTOP: 86 fprintf(stderr, "Stop signal caught, but unsupported. Ignoring. ");88 fprintf(stderr, "Stop signal caught, but unsupported. Ignoring.\n"); 87 89 break; 88 90 case SIGKILL:
Note:
See TracChangeset
for help on using the changeset viewer.