Changeset 5cde90f in mainline for uspace/app
- Timestamp:
- 2010-02-19T17:16:46Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 617652f
- Parents:
- b86d436 (diff), f41aa81 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/app
- Files:
-
- 11 added
- 20 edited
-
bdsh/Makefile (modified) (1 diff)
-
bdsh/cmds/builtins/builtins.h (modified) (1 diff)
-
bdsh/cmds/builtins/cd/cd_def.h (modified) (1 diff)
-
bdsh/cmds/builtins/exit/exit_def.h (modified) (1 diff)
-
bdsh/cmds/modules/bdd/bdd.c (modified) (1 diff)
-
bdsh/cmds/modules/cat/cat.c (modified) (1 diff)
-
bdsh/cmds/modules/cp/cp.c (modified) (1 diff)
-
bdsh/cmds/modules/module_aliases.h (modified) (1 diff)
-
bdsh/cmds/modules/modules.h (modified) (2 diffs)
-
bdsh/cmds/modules/unmount/entry.h (added)
-
bdsh/cmds/modules/unmount/unmount.c (added)
-
bdsh/cmds/modules/unmount/unmount.h (added)
-
bdsh/cmds/modules/unmount/unmount_def.h (added)
-
bdsh/input.c (modified) (2 diffs)
-
edit/edit.c (modified) (4 diffs)
-
init/init.c (modified) (8 diffs)
-
init/init.h (modified) (1 diff)
-
mkfat/fat.h (modified) (2 diffs)
-
mkfat/mkfat.c (modified) (4 diffs)
-
redir/redir.c (modified) (1 diff)
-
taskdump/Makefile (added)
-
taskdump/elf_core.c (added)
-
taskdump/include/elf.h (added)
-
taskdump/include/elf_core.h (added)
-
taskdump/include/symtab.h (added)
-
taskdump/symtab.c (added)
-
taskdump/taskdump.c (added)
-
tester/fault/fault2.c (modified) (2 diffs)
-
tester/vfs/vfs1.c (modified) (1 diff)
-
trace/ipcp.c (modified) (4 diffs)
-
trace/trace.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/Makefile
rb86d436 r5cde90f 48 48 cmds/modules/mv/mv.c \ 49 49 cmds/modules/mount/mount.c \ 50 cmds/modules/unmount/unmount.c \ 50 51 cmds/modules/kcon/kcon.c \ 51 52 cmds/builtins/exit/exit.c \ -
uspace/app/bdsh/cmds/builtins/builtins.h
rb86d436 r5cde90f 10 10 #include "cd/cd_def.h" 11 11 #include "exit/exit_def.h" 12 {NULL, NULL, NULL, NULL }12 {NULL, NULL, NULL, NULL, NULL} 13 13 }; 14 14 -
uspace/app/bdsh/cmds/builtins/cd/cd_def.h
rb86d436 r5cde90f 4 4 &cmd_cd, 5 5 &help_cmd_cd, 6 0 6 7 }, -
uspace/app/bdsh/cmds/builtins/exit/exit_def.h
rb86d436 r5cde90f 4 4 &cmd_exit, 5 5 &help_cmd_exit, 6 0 6 7 }, -
uspace/app/bdsh/cmds/modules/bdd/bdd.c
rb86d436 r5cde90f 73 73 size_t block_size; 74 74 int rc; 75 bn_t ba;75 aoff64_t ba; 76 76 uint8_t b; 77 77 -
uspace/app/bdsh/cmds/modules/cat/cat.c
rb86d436 r5cde90f 85 85 { 86 86 int fd, bytes = 0, count = 0, reads = 0; 87 off _t total = 0;87 off64_t total = 0; 88 88 char *buff = NULL; 89 89 -
uspace/app/bdsh/cmds/modules/cp/cp.c
rb86d436 r5cde90f 74 74 { 75 75 int fd1, fd2, bytes = 0; 76 off _t total = 0;76 off64_t total = 0; 77 77 int64_t copied = 0; 78 78 char *buff = NULL; -
uspace/app/bdsh/cmds/modules/module_aliases.h
rb86d436 r5cde90f 14 14 char *mod_aliases[] = { 15 15 "ren", "mv", 16 "umount", "unmount", 16 17 NULL, NULL 17 18 }; -
uspace/app/bdsh/cmds/modules/modules.h
rb86d436 r5cde90f 31 31 #include "mv/entry.h" 32 32 #include "mount/entry.h" 33 #include "unmount/entry.h" 33 34 #include "kcon/entry.h" 34 35 … … 51 52 #include "mv/mv_def.h" 52 53 #include "mount/mount_def.h" 54 #include "unmount/unmount_def.h" 53 55 #include "kcon/kcon_def.h" 54 56 -
uspace/app/bdsh/input.c
rb86d436 r5cde90f 508 508 { 509 509 int sa, sb; 510 wchar_t tmp_c;511 510 char *str; 512 511 … … 514 513 515 514 if (sb < ti->nc) { 516 tmp_c = ti->buffer[sb];515 wchar_t tmp_c = ti->buffer[sb]; 517 516 ti->buffer[sb] = '\0'; 518 } 519 520 str = wstr_to_astr(ti->buffer + sa); 521 522 if (sb < ti->nc) 517 str = wstr_to_astr(ti->buffer + sa); 523 518 ti->buffer[sb] = tmp_c; 524 519 } else 520 str = wstr_to_astr(ti->buffer + sa); 521 525 522 if (str == NULL) 526 523 goto error; -
uspace/app/edit/edit.c
rb86d436 r5cde90f 718 718 wchar_t c; 719 719 size_t pos, size; 720 unsigneds_column;720 int s_column; 721 721 coord_t csel_start, csel_end, ctmp; 722 722 … … 766 766 s_column = pane.sh_column; 767 767 while (pos < size) { 768 if ( csel_start.row == rbc.row && csel_start.column == s_column) {768 if ((csel_start.row == rbc.row) && (csel_start.column == s_column)) { 769 769 fflush(stdout); 770 770 console_set_color(con, COLOR_BLACK, COLOR_RED, 0); … … 772 772 } 773 773 774 if ( csel_end.row == rbc.row && csel_end.column == s_column) {774 if ((csel_end.row == rbc.row) && (csel_end.column == s_column)) { 775 775 fflush(stdout); 776 776 console_set_color(con, COLOR_BLACK, COLOR_WHITE, 0); … … 792 792 } 793 793 794 if ( csel_end.row == rbc.row && csel_end.column == s_column) {794 if ((csel_end.row == rbc.row) && (csel_end.column == s_column)) { 795 795 fflush(stdout); 796 796 console_set_color(con, COLOR_BLACK, COLOR_WHITE, 0); -
uspace/app/init/init.c
rb86d436 r5cde90f 94 94 static bool mount_devfs(void) 95 95 { 96 char null[MAX_DEVICE_NAME]; 97 int null_id = devmap_null_create(); 98 99 if (null_id == -1) { 100 printf(NAME ": Unable to create null device\n"); 101 return false; 102 } 103 104 snprintf(null, MAX_DEVICE_NAME, "null/%d", null_id); 105 int rc = mount("devfs", DEVFS_MOUNT_POINT, null, "", IPC_FLAG_BLOCKING); 96 int rc = mount("devfs", DEVFS_MOUNT_POINT, "", "", IPC_FLAG_BLOCKING); 106 97 107 98 switch (rc) { … … 111 102 case EBUSY: 112 103 printf(NAME ": Device filesystem already mounted\n"); 113 devmap_null_destroy(null_id);114 104 return false; 115 105 case ELIMIT: 116 106 printf(NAME ": Unable to mount device filesystem\n"); 117 devmap_null_destroy(null_id);118 107 return false; 119 108 case ENOENT: 120 109 printf(NAME ": Unknown filesystem type (devfs)\n"); 121 devmap_null_destroy(null_id);122 110 return false; 123 111 default: 124 112 printf(NAME ": Error mounting device filesystem (%d)\n", rc); 125 devmap_null_destroy(null_id);126 113 return false; 127 114 } … … 184 171 { 185 172 char *argv[3]; 186 char hid_in[ MAX_DEVICE_NAME];173 char hid_in[DEVMAP_NAME_MAXLEN]; 187 174 int rc; 188 175 189 snprintf(hid_in, MAX_DEVICE_NAME, "%s/%s", DEVFS_MOUNT_POINT, dev);176 snprintf(hid_in, DEVMAP_NAME_MAXLEN, "%s/%s", DEVFS_MOUNT_POINT, dev); 190 177 191 178 printf(NAME ": Spawning %s with %s\n", SRV_CONSOLE, hid_in); … … 209 196 { 210 197 char *argv[4]; 211 char term[ MAX_DEVICE_NAME];198 char term[DEVMAP_NAME_MAXLEN]; 212 199 int rc; 213 200 214 snprintf(term, MAX_DEVICE_NAME, "%s/%s", DEVFS_MOUNT_POINT, dev);201 snprintf(term, DEVMAP_NAME_MAXLEN, "%s/%s", DEVFS_MOUNT_POINT, dev); 215 202 216 203 printf(NAME ": Spawning %s with %s %s\n", APP_GETTERM, term, app); … … 233 220 } 234 221 222 static void mount_scratch(void) 223 { 224 int rc; 225 226 printf("Trying to mount null/0 on /scratch... "); 227 fflush(stdout); 228 229 rc = mount("tmpfs", "/scratch", "null/0", "", 0); 230 if (rc == EOK) 231 printf("OK\n"); 232 else 233 printf("Failed\n"); 234 } 235 235 236 static void mount_data(void) 236 237 { … … 255 256 return -1; 256 257 } 258 259 /* Make sure tmpfs is running. */ 260 if (str_cmp(STRING(RDFMT), "tmpfs") != 0) { 261 spawn("/srv/tmpfs"); 262 } 257 263 258 264 spawn("/srv/devfs"); 265 spawn("/srv/taskmon"); 259 266 260 267 if (!mount_devfs()) { … … 262 269 return -2; 263 270 } 271 272 mount_scratch(); 264 273 265 274 spawn("/srv/fhc"); 266 275 spawn("/srv/obio"); 276 srv_start("/srv/cuda_adb"); 267 277 srv_start("/srv/i8042"); 268 srv_start("/srv/c_mouse"); 278 srv_start("/srv/adb_ms"); 279 srv_start("/srv/char_ms"); 269 280 270 281 spawn("/srv/fb"); … … 298 309 getterm("term/vc5", "/app/bdsh"); 299 310 getterm("term/vc6", "/app/klog"); 300 311 301 312 return 0; 302 313 } -
uspace/app/init/init.h
rb86d436 r5cde90f 39 39 #define NAME "init" 40 40 41 #define MAX_DEVICE_NAME 3242 43 41 #endif 44 42 -
uspace/app/mkfat/fat.h
rb86d436 r5cde90f 78 78 uint16_t signature; 79 79 } __attribute__ ((packed)); 80 struct fat32{80 struct { 81 81 /* FAT32 only */ 82 82 /** Sectors per FAT. */ … … 108 108 /** Signature. */ 109 109 uint16_t signature; 110 } __attribute__ ((packed));110 } fat32 __attribute__ ((packed)); 111 111 }; 112 112 } __attribute__ ((packed)) fat_bs_t; -
uspace/app/mkfat/mkfat.c
rb86d436 r5cde90f 44 44 #include <devmap.h> 45 45 #include <byteorder.h> 46 #include <sys/types.h> 47 #include <sys/typefmt.h> 48 #include <inttypes.h> 46 49 #include <errno.h> 47 50 #include "fat.h" … … 95 98 size_t block_size; 96 99 char *endptr; 97 bn_t dev_nblocks;100 aoff64_t dev_nblocks; 98 101 99 102 cfg.total_sectors = 0; … … 157 160 printf(NAME ": Warning, failed to obtain block device size.\n"); 158 161 } else { 159 printf(NAME ": Block device has %llu blocks.\n", dev_nblocks); 162 printf(NAME ": Block device has %" PRIuOFF64 " blocks.\n", 163 dev_nblocks); 160 164 cfg.total_sectors = dev_nblocks; 161 165 } … … 232 236 static int fat_blocks_write(struct fat_params const *par, dev_handle_t handle) 233 237 { 234 bn_t addr;238 aoff64_t addr; 235 239 uint8_t *buffer; 236 240 int i; -
uspace/app/redir/redir.c
rb86d436 r5cde90f 72 72 static task_id_t spawn(int argc, char *argv[]) 73 73 { 74 char **args = (char * ) calloc(argc + 1, sizeof(char *));74 char **args = (char **) calloc(argc + 1, sizeof(char *)); 75 75 if (!args) { 76 76 printf("No memory available\n"); -
uspace/app/tester/fault/fault2.c
rb86d436 r5cde90f 30 30 #include "../tester.h" 31 31 32 typedef int __attribute__((may_alias)) aliasing_int; 33 32 34 char *test_fault2(void) 33 35 { … … 35 37 volatile int var1; 36 38 37 var1 = *(( int *) (((char *) (&var)) + 1));39 var1 = *((aliasing_int *) (((char *) (&var)) + 1)); 38 40 39 41 return "Survived unaligned read"; -
uspace/app/tester/vfs/vfs1.c
rb86d436 r5cde90f 79 79 TPRINTF("Created directory %s\n", MOUNT_POINT); 80 80 81 char null[MAX_DEVICE_NAME]; 82 int null_id = devmap_null_create(); 83 84 if (null_id == -1) 85 return "Unable to create null device"; 86 87 snprintf(null, MAX_DEVICE_NAME, "null/%d", null_id); 88 int rc = mount(FS_TYPE, MOUNT_POINT, null, OPTIONS, FLAGS); 81 int rc = mount(FS_TYPE, MOUNT_POINT, "", OPTIONS, FLAGS); 89 82 switch (rc) { 90 83 case EOK: 91 TPRINTF("Mounted /dev/%s as %s on %s\n", null, FS_TYPE, MOUNT_POINT);84 TPRINTF("Mounted %s on %s\n", FS_TYPE, MOUNT_POINT); 92 85 break; 93 86 case EBUSY: -
uspace/app/trace/ipcp.c
rb86d436 r5cde90f 36 36 #include <stdlib.h> 37 37 #include <adt/hash_table.h> 38 #include <sys/typefmt.h> 38 39 39 40 #include "ipc_desc.h" … … 200 201 201 202 if ((display_mask & DM_IPC) != 0) { 202 printf("Call ID: 0x%lx, phone: %d, proto: %s, method: ", hash,203 printf("Call ID: %p, phone: %d, proto: %s, method: ", hash, 203 204 phone, (proto ? proto->name : "n/a")); 204 205 ipc_m_print(proto, IPC_GET_METHOD(*call)); 205 printf(" args: (%lu, %lu, %lu, %lu, %lu)\n", args[1], args[2], 206 printf(" args: (%" PRIuIPCARG ", %" PRIuIPCARG ", %" PRIuIPCARG 207 ", %" PRIuIPCARG ", %" PRIuIPCARG ")\n", args[1], args[2], 206 208 args[3], args[4], args[5]); 207 209 } … … 279 281 280 282 if ((display_mask & DM_IPC) != 0) { 281 printf("Response to 0x%lx: retval=%ld, args = (%lu, %lu, %lu, %lu, %lu)\n", 282 hash, retval, IPC_GET_ARG1(*answer), 283 IPC_GET_ARG2(*answer), IPC_GET_ARG3(*answer), 284 IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer)); 283 printf("Response to %p: retval=%ld, args = (%" PRIuIPCARG 284 ", %" PRIuIPCARG ", %" PRIuIPCARG ", %" PRIuIPCARG 285 ", %" PRIuIPCARG ")\n", 286 hash, retval, IPC_GET_ARG1(*answer), 287 IPC_GET_ARG2(*answer), IPC_GET_ARG3(*answer), 288 IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer)); 285 289 } 286 290 … … 336 340 /* Not a response */ 337 341 if ((display_mask & DM_IPC) != 0) { 338 printf("Not a response (hash 0x%lx)\n", hash);342 printf("Not a response (hash %p)\n", hash); 339 343 } 340 344 return; -
uspace/app/trace/trace.c
rb86d436 r5cde90f 49 49 #include <io/keycode.h> 50 50 #include <fibril_synch.h> 51 #include <sys/types.h> 52 #include <sys/typefmt.h> 51 53 52 54 #include <libc.h> … … 159 161 if (rc < 0) { 160 162 printf("Error connecting\n"); 161 printf("ipc_connect_task(% lld) -> %d ", task_id, rc);163 printf("ipc_connect_task(%" PRIdTASKID ") -> %d ", task_id, rc); 162 164 return rc; 163 165 } … … 198 200 printf("Threads:"); 199 201 for (i = 0; i < n_threads; i++) { 200 printf(" [%d] (hash 0x%lx)", 1+i, thread_hash_buf[i]);202 printf(" [%d] (hash %p)", 1+i, thread_hash_buf[i]); 201 203 } 202 204 printf("\ntotal of %u threads\n", tb_needed / sizeof(uintptr_t)); … … 222 224 case V_HASH: 223 225 case V_PTR: 224 printf(" 0x%08lx", val);226 printf("%p", val); 225 227 break; 226 228 … … 275 277 276 278 putchar('('); 277 if (n > 0) printf("% ld", sc_args[0]);279 if (n > 0) printf("%" PRIdSYSARG, sc_args[0]); 278 280 for (i = 1; i < n; i++) { 279 printf(", % ld", sc_args[i]);281 printf(", %" PRIdSYSARG, sc_args[i]); 280 282 } 281 283 putchar(')'); … … 508 510 } 509 511 510 printf("Start tracing thread [%d] (hash 0x%lx).\n", thread_id, thread_hash);512 printf("Start tracing thread [%d] (hash %p).\n", thread_id, thread_hash); 511 513 512 514 while (!abort_trace) { … … 552 554 break; 553 555 case UDEBUG_EVENT_THREAD_E: 554 printf("Thread 0x%lxexited.\n", val0);556 printf("Thread %p exited.\n", val0); 555 557 fibril_mutex_lock(&state_lock); 556 558 abort_trace = true; … … 972 974 rc = connect_task(task_id); 973 975 if (rc < 0) { 974 printf("Failed connecting to task % lld.\n", task_id);976 printf("Failed connecting to task %" PRIdTASKID ".\n", task_id); 975 977 return 1; 976 978 } 977 979 978 printf("Connected to task % lld.\n", task_id);980 printf("Connected to task %" PRIdTASKID ".\n", task_id); 979 981 980 982 if (task_ldr != NULL)
Note:
See TracChangeset
for help on using the changeset viewer.
