Changes in / [cf5e86e:5d1b3aa] in mainline
- Files:
-
- 40 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile.common
rcf5e86e r5d1b3aa 97 97 $(USPACE_PATH)/srv/fs/tmpfs/tmpfs \ 98 98 $(USPACE_PATH)/srv/fs/fat/fat \ 99 $(USPACE_PATH)/srv/fs/pipefs/pipefs \100 $(USPACE_PATH)/srv/fs/ext2fs/ext2fs \101 99 $(USPACE_PATH)/srv/taskmon/taskmon \ 102 100 $(USPACE_PATH)/srv/hw/netif/ne2000/ne2000 \ … … 137 135 138 136 RD_APPS_NON_ESSENTIAL = \ 139 $(USPACE_PATH)/app/blkdump/blkdump \140 $(USPACE_PATH)/app/bnchmark/bnchmark \141 137 $(USPACE_PATH)/app/dltest/dltest \ 142 138 $(USPACE_PATH)/app/dltest2/dltest2 \ 143 139 $(USPACE_PATH)/app/dload/dload \ 144 140 $(USPACE_PATH)/app/edit/edit \ 145 $(USPACE_PATH)/app/ext2info/ext2info \146 141 $(USPACE_PATH)/app/kill/kill \ 147 142 $(USPACE_PATH)/app/killall/killall \ … … 151 146 $(USPACE_PATH)/app/taskdump/taskdump \ 152 147 $(USPACE_PATH)/app/tester/tester \ 153 $(USPACE_PATH)/app/testread/testread \154 148 $(USPACE_PATH)/app/tetris/tetris \ 155 149 $(USPACE_PATH)/app/trace/trace \ -
uspace/Makefile
rcf5e86e r5d1b3aa 35 35 DIRS = \ 36 36 app/bdsh \ 37 app/blkdump \38 app/bnchmark \39 37 app/edit \ 40 app/ext2info \41 38 app/getterm \ 42 39 app/init \ … … 50 47 app/taskdump \ 51 48 app/tester \ 52 app/testread \53 49 app/tetris \ 54 50 app/trace \ … … 76 72 srv/fs/tmpfs \ 77 73 srv/fs/devfs \ 78 srv/fs/pipefs \79 srv/fs/ext2fs \80 74 srv/hid/adb_mouse \ 81 75 srv/hid/char_mouse \ … … 155 149 lib/drv \ 156 150 lib/packet \ 157 lib/net \ 158 lib/ext2 151 lib/net 159 152 160 153 LIBC_BUILD = $(addsuffix .build,$(LIBC)) -
uspace/Makefile.common
rcf5e86e r5d1b3aa 108 108 LIBCLUI_PREFIX = $(LIB_PREFIX)/clui 109 109 110 LIBEXT2_PREFIX = $(LIB_PREFIX)/ext2111 112 110 LIBDRV_PREFIX = $(LIB_PREFIX)/drv 113 111 LIBPACKET_PREFIX = $(LIB_PREFIX)/packet -
uspace/app/bdsh/cmds/modules/mount/mount.c
rcf5e86e r5d1b3aa 51 51 { 52 52 static char helpfmt[] = 53 "Usage: %s <fstype> <mp> [dev][<moptions>]\n";53 "Usage: %s <fstype> <mp> <dev> [<moptions>]\n"; 54 54 if (level == HELP_SHORT) { 55 55 printf("'%s' mounts a file system.\n", cmdname); … … 66 66 unsigned int argc; 67 67 const char *mopts = ""; 68 const char *dev = "";69 68 int rc, c, opt_ind; 70 69 … … 80 79 } 81 80 82 if ((argc < 3) || (argc > 5)) {81 if ((argc < 4) || (argc > 5)) { 83 82 printf("%s: invalid number of arguments. Try `mount --help'\n", 84 83 cmdname); 85 84 return CMD_FAILURE; 86 85 } 87 if (argc > 3)88 dev = argv[3];89 86 if (argc == 5) 90 87 mopts = argv[4]; 91 88 92 rc = mount(argv[1], argv[2], dev, mopts, 0);89 rc = mount(argv[1], argv[2], argv[3], mopts, 0); 93 90 if (rc != EOK) { 94 91 printf("Unable to mount %s filesystem to %s on %s (rc=%d)\n", -
uspace/app/redir/redir.c
rcf5e86e r5d1b3aa 49 49 static void usage(void) 50 50 { 51 fprintf(stderr,"Usage: %s [-i <stdin>] [-o <stdout>] [-e <stderr>] -- <cmd> [args ...]\n",51 printf("Usage: %s [-i <stdin>] [-o <stdout>] [-e <stderr>] -- <cmd> [args ...]\n", 52 52 NAME); 53 53 } … … 83 83 args = (const char **) calloc(argc + 1, sizeof(char *)); 84 84 if (!args) { 85 fprintf(stderr,"No memory available\n");85 printf("No memory available\n"); 86 86 return 0; 87 87 } … … 98 98 99 99 if (rc != EOK) { 100 fprintf(stderr,"%s: Error spawning %s (%s)\n", NAME, argv[0],100 printf("%s: Error spawning %s (%s)\n", NAME, argv[0], 101 101 str_error(rc)); 102 return 0;103 102 } 104 103 -
uspace/app/tester/Makefile
rcf5e86e r5d1b3aa 29 29 30 30 USPACE_PREFIX = ../.. 31 LIBS = $(LIBBLOCK_PREFIX)/libblock.a $(LIBEXT2_PREFIX)/libext2.a32 EXTRA_CFLAGS = -I$(LIBBLOCK_PREFIX) -I$(LIBEXT2_PREFIX)33 31 BINARY = tester 34 32 35 33 SOURCES = \ 36 34 tester.c \ 37 util.c \38 35 thread/thread1.c \ 39 36 print/print1.c \ … … 58 55 devs/devman2.c \ 59 56 hw/misc/virtchar1.c \ 60 hw/serial/serial1.c \ 61 libext2/libext2_1.c 57 hw/serial/serial1.c 62 58 63 59 include $(USPACE_PREFIX)/Makefile.common -
uspace/app/tester/tester.c
rcf5e86e r5d1b3aa 66 66 #include "hw/serial/serial1.def" 67 67 #include "hw/misc/virtchar1.def" 68 #include "libext2/libext2_1.def"69 68 #include "devs/devman1.def" 70 69 #include "devs/devman2.def" -
uspace/app/tester/tester.h
rcf5e86e r5d1b3aa 99 99 extern const char *test_serial1(void); 100 100 extern const char *test_virtchar1(void); 101 extern const char *test_libext2_1(void);102 101 extern const char *test_devman1(void); 103 102 extern const char *test_devman2(void); -
uspace/lib/block/libblock.c
rcf5e86e r5d1b3aa 2 2 * Copyright (c) 2008 Jakub Jermar 3 3 * Copyright (c) 2008 Martin Decky 4 * Copyright (c) 2011 Martin Sucha5 4 * All rights reserved. 6 5 * … … 828 827 } 829 828 830 /** Read bytes directly from the device (bypass cache)831 *832 * @param devmap_handle Device handle of the block device.833 * @param abs_offset Absolute offset in bytes where to start reading834 * @param bytes Number of bytes to read835 * @param data Buffer that receives the data836 *837 * @return EOK on success or negative error code on failure.838 */839 int block_read_bytes_direct(devmap_handle_t devmap_handle, aoff64_t abs_offset,840 size_t bytes, void *data)841 {842 int rc;843 size_t phys_block_size;844 size_t buf_size;845 void *buffer;846 aoff64_t first_block;847 aoff64_t last_block;848 size_t blocks;849 size_t offset;850 851 rc = block_get_bsize(devmap_handle, &phys_block_size);852 if (rc != EOK) {853 return rc;854 }855 856 /* calculate data position and required space */857 first_block = abs_offset / phys_block_size;858 offset = abs_offset % phys_block_size;859 last_block = (abs_offset + bytes - 1) / phys_block_size;860 blocks = last_block - first_block + 1;861 buf_size = blocks * phys_block_size;862 863 /* read the data into memory */864 buffer = malloc(buf_size);865 if (buffer == NULL) {866 return ENOMEM;867 }868 869 rc = block_read_direct(devmap_handle, first_block, blocks, buffer);870 if (rc != EOK) {871 free(buffer);872 return rc;873 }874 875 /* copy the data from the buffer */876 memcpy(data, buffer + offset, bytes);877 free(buffer);878 879 return EOK;880 }881 882 829 /** Read blocks from block device. 883 830 * -
uspace/lib/block/libblock.h
rcf5e86e r5d1b3aa 2 2 * Copyright (c) 2008 Jakub Jermar 3 3 * Copyright (c) 2008 Martin Decky 4 * Copyright (c) 2011 Martin Sucha5 4 * All rights reserved. 6 5 * … … 114 113 extern int block_get_nblocks(devmap_handle_t, aoff64_t *); 115 114 extern int block_read_direct(devmap_handle_t, aoff64_t, size_t, void *); 116 extern int block_read_bytes_direct(devmap_handle_t, aoff64_t, size_t, void *);117 115 extern int block_write_direct(devmap_handle_t, aoff64_t, size_t, const void *); 118 116
Note:
See TracChangeset
for help on using the changeset viewer.