Changes in / [d3e241a:b705ecc] in mainline
- Files:
-
- 240 added
- 4 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
rd3e241a rb705ecc 554 554 ! CONFIG_WRITE_CORE_FILES (n/y) 555 555 556 % Include development files (headers, libraries) 557 ! [RDFMT=tmpfs|RDFMT=ext2fs] CONFIG_DEVEL_FILES (n/y) 558 556 559 % Strip binaries 557 560 ! CONFIG_STRIP_BINARIES (n/y) … … 562 565 % Barebone build with essential binaries only 563 566 ! CONFIG_BAREBONE (n/y) 567 568 % Build pcc binaries 569 ! CONFIG_PCC (n/y) 564 570 565 571 % Build binutils binaries -
boot/Makefile
rd3e241a rb705ecc 61 61 cp "$$file" "$(DIST_PATH)/lib/" ; \ 62 62 done 63 ifeq ($(CONFIG_DEVEL_FILES), y) 64 mkdir "$(DIST_PATH)/inc/c/" 65 cp -r -L "$(USPACE_PATH)/lib/c/include/." "$(DIST_PATH)/inc/c/" 66 cat "$(USPACE_PATH)/lib/c/arch/$(UARCH)/_link.ld" | sed 's/^STARTUP(.*)$$//g' > "$(DIST_PATH)/inc/_link.ld" 67 endif 63 68 for file in $(RD_APPS) ; do \ 64 69 cp "$$file" "$(DIST_PATH)/app/" ; \ … … 94 99 rm -rf $(USPACE_PATH)/dist/drv/* 95 100 rm -f $(USPACE_PATH)/dist/lib/* 101 rm -rf $(USPACE_PATH)/dist/inc/* 96 102 rm -f $(USPACE_PATH)/dist/app/* 97 103 rm -f $(USPACE_PATH)/dist/cfg/net/* -
boot/Makefile.common
rd3e241a rb705ecc 126 126 127 127 RD_LIBS = 128 129 ifeq ($(CONFIG_DEVEL_FILES), y) 130 RD_LIBS += \ 131 $(USPACE_PATH)/lib/c/libc.a \ 132 $(USPACE_PATH)/lib/softint/libsoftint.a \ 133 $(USPACE_PATH)/lib/softfloat/libsoftfloat.a 134 endif 128 135 129 136 ifeq ($(CONFIG_BUILD_SHARED_LIBS), y) … … 171 178 $(USPACE_PATH)/app/websrv/websrv 172 179 180 ifeq ($(CONFIG_PCC),y) 181 RD_APPS_NON_ESSENTIAL += \ 182 $(USPACE_PATH)/app/cc/cc \ 183 $(USPACE_PATH)/app/ccom/ccom \ 184 $(USPACE_PATH)/app/ccom/mkext/cc_mkext \ 185 $(USPACE_PATH)/app/cpp/cpp 186 endif 187 173 188 ifeq ($(CONFIG_BINUTILS),y) 174 189 RD_APPS_NON_ESSENTIAL += \ -
uspace/Makefile
rd3e241a rb705ecc 111 111 drv/bus/usb/vhc 112 112 113 ifeq ($(CONFIG_PCC),y) 114 DIRS += \ 115 app/cc \ 116 app/ccom \ 117 app/ccom/mkext \ 118 app/cpp 119 endif 120 113 121 ifeq ($(CONFIG_BINUTILS),y) 114 122 DIRS += \ -
uspace/app/bdsh/cmds/modules/help/help.c
rd3e241a rb705ecc 43 43 extern const char *progname; 44 44 45 #define HELP_IS_BATCH 3 45 46 #define HELP_IS_COMMANDS 2 46 47 #define HELP_IS_MODULE 1 … … 54 55 { 55 56 int rc = HELP_IS_RUBBISH; 57 58 if (str_cmp(cmd, "batch") == 0) 59 return HELP_IS_BATCH; 56 60 57 61 if (str_cmp(cmd, "commands") == 0) … … 87 91 "\n If no argument is given to %s, a list of commands are shown\n\n", 88 92 cmdname, cmdname, cmdname, cmdname); 93 } 94 95 return; 96 } 97 98 static void help_batch(unsigned int level) 99 { 100 if (level == HELP_SHORT) { 101 printf( 102 "\n batch [filename]\n" 103 " Issues commands stored in the file.\n" 104 " Each command must correspond to the single line in the file.\n\n"); 105 } else { 106 printf( 107 "\n `batch' - issues a batch of commands\n" 108 " Issues commands stored in the file. Each command must correspond\n" 109 " to the single line in the file. Empty lines can be used to visually\n" 110 " separate groups of commands. There is no support for comments,\n" 111 " variables, recursion or other programming constructs - the `batch'\n" 112 " command is indeed very trivial.\n\n"); 89 113 } 90 114 … … 121 145 } 122 146 147 printf(" %-16s\t%s\n", "batch", "Issue batch of commands"); 123 148 printf("\n Try %s %s for more information on how `%s' works.\n\n", 124 149 cmdname, cmdname, cmdname); … … 182 207 help_commands(); 183 208 return CMD_SUCCESS; 209 case HELP_IS_BATCH: 210 help_batch(level); 211 return CMD_SUCCESS; 184 212 case HELP_IS_MODULE: 185 213 help_module(mod_switch, level); -
uspace/app/bdsh/input.c
rd3e241a rb705ecc 169 169 new_iostate.stdout = to; 170 170 } 171 172 rc = run_command(actual_cmd, usr, &new_iostate); 171 172 if (str_cmp(actual_cmd[0], "batch") == 0 && actual_cmd[1] != NULL) { 173 FILE *batch = fopen(actual_cmd[1], "r"); 174 if (batch == NULL) { 175 printf("Cannot open file %s\n", actual_cmd[1]); 176 rc = errno; 177 } else { 178 cliuser_t fusr; 179 fusr.name = usr->name; 180 fusr.cwd = usr->cwd; 181 fusr.prompt = usr->prompt; 182 fusr.line = malloc(INPUT_MAX + 1); 183 char *cur = fusr.line; 184 char *end = fusr.line + INPUT_MAX; 185 int c = fgetc(batch); 186 while (fusr.line != NULL) { 187 if (c == '\n' || c == EOF || cur == end) { 188 *cur = '\0'; 189 if (cur == fusr.line) { 190 /* skip empty line */ 191 rc = 0; 192 free(cur); 193 } else { 194 printf(">%s\n", fusr.line); 195 rc = process_input(&fusr); 196 /* fusr->line was freed by process_input() */ 197 } 198 if (rc == 0 && c != EOF) { 199 fusr.line = malloc(INPUT_MAX + 1); 200 cur = fusr.line; 201 end = fusr.line + INPUT_MAX; 202 } else { 203 break; 204 } 205 } else { 206 *cur++ = c; 207 } 208 c = fgetc(batch); 209 } 210 fclose(batch); 211 } 212 } else { 213 rc = run_command(actual_cmd, usr, &new_iostate); 214 } 173 215 174 216 finit_with_files: -
uspace/app/tetris/tetris.c
rd3e241a rb705ecc 291 291 for (j = i + 1; j <= 5; j++) { 292 292 if (keys[i] == keys[j]) 293 errx(1, " duplicate command keys specified.");293 errx(1, "%s", "duplicate command keys specified."); 294 294 } 295 295 -
uspace/lib/c/arch/abs32le/include/types.h
rd3e241a rb705ecc 51 51 typedef uint32_t size_t; 52 52 53 typedef int32_t intptr_t; 53 54 typedef uint32_t uintptr_t; 54 55 typedef uint32_t atomic_count_t; -
uspace/lib/c/arch/amd64/include/atomic.h
rd3e241a rb705ecc 45 45 { 46 46 asm volatile ( 47 "lock incq % [count]\n"48 : [count]"+m" (val->count)47 "lock incq %0\n" 48 : "+m" (val->count) 49 49 ); 50 50 } … … 53 53 { 54 54 asm volatile ( 55 "lock decq % [count]\n"56 : [count]"+m" (val->count)55 "lock decq %0\n" 56 : "+m" (val->count) 57 57 ); 58 58 } … … 63 63 64 64 asm volatile ( 65 "lock xaddq % [r], %[count]\n"66 : [count]"+m" (val->count),67 [r]"+r" (r)65 "lock xaddq %1, %0\n" 66 : "+m" (val->count), 67 "+r" (r) 68 68 ); 69 69 … … 76 76 77 77 asm volatile ( 78 "lock xaddq % [r], %[count]\n"79 : [count]"+m" (val->count),80 [r]"+r" (r)78 "lock xaddq %1, %0\n" 79 : "+m" (val->count), 80 "+r" (r) 81 81 ); 82 82 -
uspace/lib/c/arch/amd64/include/types.h
rd3e241a rb705ecc 51 51 typedef uint64_t size_t; 52 52 53 typedef int64_t intptr_t; 53 54 typedef uint64_t uintptr_t; 54 55 typedef uint64_t atomic_count_t; -
uspace/lib/c/arch/arm32/include/types.h
rd3e241a rb705ecc 52 52 typedef uint32_t size_t; 53 53 54 typedef int32_t intptr_t; 54 55 typedef uint32_t uintptr_t; 55 56 typedef uint32_t atomic_count_t; -
uspace/lib/c/arch/ia32/include/atomic.h
rd3e241a rb705ecc 43 43 { 44 44 asm volatile ( 45 "lock incl % [count]\n"46 : [count]"+m" (val->count)45 "lock incl %0\n" 46 : "+m" (val->count) 47 47 ); 48 48 } … … 51 51 { 52 52 asm volatile ( 53 "lock decl % [count]\n"54 : [count]"+m" (val->count)53 "lock decl %0\n" 54 : "+m" (val->count) 55 55 ); 56 56 } … … 61 61 62 62 asm volatile ( 63 "lock xaddl % [r], %[count]\n"64 : [count]"+m" (val->count),65 [r]"+r" (r)63 "lock xaddl %1, %0\n" 64 : "+m" (val->count), 65 "+r" (r) 66 66 ); 67 67 … … 74 74 75 75 asm volatile ( 76 "lock xaddl % [r], %[count]\n"77 : [count]"+m" (val->count),78 [r]"+r" (r)76 "lock xaddl %1, %0\n" 77 : "+m" (val->count), 78 "+r" (r) 79 79 ); 80 80 -
uspace/lib/c/arch/ia32/include/ddi.h
rd3e241a rb705ecc 44 44 45 45 asm volatile ( 46 "inb %w [port], %b[val]\n"47 : [val]"=a" (val)48 : [port]"d" (port)46 "inb %w1, %b0\n" 47 : "=a" (val) 48 : "d" (port) 49 49 ); 50 50 … … 57 57 58 58 asm volatile ( 59 "inw %w [port], %w[val]\n"60 : [val]"=a" (val)61 : [port]"d" (port)59 "inw %w1, %w0\n" 60 : "=a" (val) 61 : "d" (port) 62 62 ); 63 63 … … 70 70 71 71 asm volatile ( 72 "inl %w [port], %[val]\n"73 : [val]"=a" (val)74 : [port]"d" (port)72 "inl %w1, %0\n" 73 : "=a" (val) 74 : "d" (port) 75 75 ); 76 76 … … 81 81 { 82 82 asm volatile ( 83 "outb %b [val], %w[port]\n"84 :: [val] "a" (val), [port]"d" (port)83 "outb %b0, %w1\n" 84 :: "a" (val), "d" (port) 85 85 ); 86 86 } … … 89 89 { 90 90 asm volatile ( 91 "outw %w [val], %w[port]\n"92 :: [val] "a" (val), [port]"d" (port)91 "outw %w0, %w1\n" 92 :: "a" (val), "d" (port) 93 93 ); 94 94 } … … 97 97 { 98 98 asm volatile ( 99 "outl % [val], %w[port]\n"100 :: [val] "a" (val), [port]"d" (port)99 "outl %0, %w1\n" 100 :: "a" (val), "d" (port) 101 101 ); 102 102 } -
uspace/lib/c/arch/ia32/include/types.h
rd3e241a rb705ecc 51 51 typedef uint32_t size_t; 52 52 53 typedef int32_t intptr_t; 53 54 typedef uint32_t uintptr_t; 54 55 typedef uint32_t atomic_count_t; -
uspace/lib/c/arch/ia64/include/types.h
rd3e241a rb705ecc 61 61 typedef uint64_t size_t; 62 62 63 typedef int64_t intptr_t; 63 64 typedef uint64_t uintptr_t; 64 65 typedef uint64_t atomic_count_t; -
uspace/lib/c/arch/mips32/include/types.h
rd3e241a rb705ecc 52 52 typedef uint32_t size_t; 53 53 54 typedef int32_t intptr_t; 54 55 typedef uint32_t uintptr_t; 55 56 typedef uint32_t atomic_count_t; -
uspace/lib/c/arch/ppc32/include/types.h
rd3e241a rb705ecc 51 51 typedef uint32_t size_t; 52 52 53 typedef int32_t intptr_t; 53 54 typedef uint32_t uintptr_t; 54 55 typedef uint32_t atomic_count_t; -
uspace/lib/c/arch/sparc64/include/types.h
rd3e241a rb705ecc 51 51 typedef uint64_t size_t; 52 52 53 typedef int64_t intptr_t; 53 54 typedef uint64_t uintptr_t; 54 55 typedef uint64_t atomic_count_t; -
uspace/lib/posix/stdio.c
rd3e241a rb705ecc 257 257 assert(stream != NULL); 258 258 259 /* Ret ieve the node. */259 /* Retrieve the node. */ 260 260 struct stat st; 261 261 int rc; … … 265 265 } else { 266 266 rc = stat(filename, &st); 267 if (-rc == ENOENT) { 268 /* file does not exist, create new file */ 269 FILE* tmp = fopen(filename, mode); 270 if (tmp != NULL) { 271 fclose(tmp); 272 /* try again */ 273 rc = stat(filename, &st); 274 } 275 } 267 276 } 268 277
Note:
See TracChangeset
for help on using the changeset viewer.