| Index: emcore/trunk/tools/emcorefs/usb.h | 
| — | — | @@ -28,11 +28,11 @@ | 
| 29 | 29 |  | 
| 30 | 30 |  | 
| 31 | 31 | int usb_init(void); | 
| 32 |  | -int usb_find(const uint16_t vendor_id, const uint16_t product_id, uint8_t* reattach);
 | 
|  | 32 | +int usb_find(uint16_t vendor_id, uint16_t product_id, uint8_t* reattach); | 
| 33 | 33 | int usb_open(libusb_device* dev, uint8_t* reattach); | 
| 34 |  | -int usb_bulk_transfer(const unsigned char endpoint, void* data, const int length);
 | 
| 35 |  | -int usb_close(const uint8_t reattach);
 | 
|  | 34 | +int usb_bulk_transfer(unsigned char endpoint, void* data, int length); | 
|  | 35 | +int usb_close(uint8_t reattach); | 
| 36 | 36 | void usb_exit(void); | 
| 37 |  | -int usb_destroy(const uint8_t reattach);
 | 
|  | 37 | +int usb_destroy(uint8_t reattach); | 
| 38 | 38 |  | 
| 39 | 39 | #endif /* __USB_H__ */ | 
| Index: emcore/trunk/tools/emcorefs/emcore.h | 
| — | — | @@ -85,53 +85,53 @@ | 
| 86 | 86 | EMCORE_ERROR_IO, | 
| 87 | 87 | }; | 
| 88 | 88 |  | 
| 89 |  | -int emcore_cout(const void* data, const uint32_t length);
 | 
| 90 |  | -int emcore_cin(void* data, const uint32_t length);
 | 
| 91 |  | -int emcore_dout(const void* data, const uint32_t length);
 | 
| 92 |  | -int emcore_din(void* data, const uint32_t length);
 | 
|  | 89 | +int emcore_cout(const void* data, uint32_t length); | 
|  | 90 | +int emcore_cin(void* data, uint32_t length); | 
|  | 91 | +int emcore_dout(const void* data, uint32_t length); | 
|  | 92 | +int emcore_din(void* data, uint32_t length); | 
| 93 | 93 |  | 
| 94 |  | -int emcore_monitor_command(const void* out, void* in, const uint32_t send_length, const uint32_t receive_length);
 | 
|  | 94 | +int emcore_monitor_command(const void* out, void* in, uint32_t send_length, uint32_t receive_length); | 
| 95 | 95 |  | 
| 96 | 96 | int emcore_get_version(struct emcore_dev_info* dev_info); | 
| 97 | 97 | int emcore_get_packet_info(struct emcore_usb_endpoints_max_packet_size* max_packet_size); | 
| 98 | 98 | int emcore_get_user_mem_range(struct emcore_user_mem_range* mem_range); | 
| 99 |  | -int emcore_reset(const uint8_t graceful);
 | 
| 100 |  | -int emcore_poweroff(const uint8_t graceful);
 | 
| 101 |  | -int emcore_readmem(void* data, const uint32_t addr, const uint32_t size);
 | 
| 102 |  | -int emcore_writemem(const void* data, const uint32_t addr, const uint32_t size);
 | 
| 103 |  | -int emcore_readdma(void* data, const uint32_t addr, const uint32_t size);
 | 
| 104 |  | -int emcore_writedma(const void* data, const uint32_t addr, const uint32_t size);
 | 
| 105 |  | -int emcore_readi2c(void* data, const uint8_t bus, const uint8_t slave, const uint8_t addr, const uint8_t size);
 | 
| 106 |  | -int emcore_writei2c(const void* data, const uint8_t bus, const uint8_t slave, const uint8_t addr, const uint8_t size);
 | 
| 107 |  | -int emcore_file_open(uint32_t* handle, const char* pathname, const int flags);
 | 
| 108 |  | -int emcore_file_size(uint32_t* size, const uint32_t handle);
 | 
| 109 |  | -int emcore_file_read(uint32_t* nread, const uint32_t handle, const uint32_t addr, const uint32_t size);
 | 
| 110 |  | -int emcore_file_write(uint32_t* nwrite, const uint32_t handle, const uint32_t addr, const uint32_t size);
 | 
| 111 |  | -int emcore_file_seek(const uint32_t handle, const uint32_t offset, const uint32_t whence);
 | 
| 112 |  | -int emcore_file_truncate(const uint32_t handle, const uint32_t length);
 | 
| 113 |  | -int emcore_file_sync(const uint32_t handle);
 | 
| 114 |  | -int emcore_file_close(const uint32_t handle);
 | 
|  | 99 | +int emcore_reset(uint8_t graceful); | 
|  | 100 | +int emcore_poweroff(uint8_t graceful); | 
|  | 101 | +int emcore_readmem(void* data, uint32_t addr, uint32_t size); | 
|  | 102 | +int emcore_writemem(const void* data, uint32_t addr, uint32_t size); | 
|  | 103 | +int emcore_readdma(void* data, uint32_t addr, uint32_t size); | 
|  | 104 | +int emcore_writedma(const void* data, uint32_t addr, uint32_t size); | 
|  | 105 | +int emcore_readi2c(void* data, uint8_t bus, uint8_t slave, uint8_t addr, uint8_t size); | 
|  | 106 | +int emcore_writei2c(const void* data, uint8_t bus, uint8_t slave, uint8_t addr, uint8_t size); | 
|  | 107 | +int emcore_file_open(uint32_t* handle, const char* pathname, int flags); | 
|  | 108 | +int emcore_file_size(uint32_t* size, uint32_t handle); | 
|  | 109 | +int emcore_file_read(uint32_t* nread, uint32_t handle, uint32_t addr, uint32_t size); | 
|  | 110 | +int emcore_file_write(uint32_t* nwrite, uint32_t handle, uint32_t addr, uint32_t size); | 
|  | 111 | +int emcore_file_seek(uint32_t handle, uint32_t offset, uint32_t whence); | 
|  | 112 | +int emcore_file_truncate(uint32_t handle, uint32_t length); | 
|  | 113 | +int emcore_file_sync(uint32_t handle); | 
|  | 114 | +int emcore_file_close(uint32_t handle); | 
| 115 | 115 | int emcore_file_close_all(uint32_t* count); | 
| 116 |  | -int emcore_file_kill_all(const uint32_t volume);
 | 
|  | 116 | +int emcore_file_kill_all(uint32_t volume); | 
| 117 | 117 | int emcore_file_unlink(const char* name); | 
| 118 | 118 | int emcore_file_rename(const char* path, const char* newpath); | 
| 119 | 119 | int emcore_dir_open(uint32_t* handle, const char* name); | 
| 120 |  | -int emcore_dir_read(struct emcore_dir_entry* entry, const uint32_t handle);
 | 
| 121 |  | -int emcore_dir_close(const uint32_t handle);
 | 
|  | 120 | +int emcore_dir_read(struct emcore_dir_entry* entry, uint32_t handle); | 
|  | 121 | +int emcore_dir_close(uint32_t handle); | 
| 122 | 122 | int emcore_dir_close_all(uint32_t* count); | 
| 123 | 123 | int emcore_dir_create(const char* name); | 
| 124 | 124 | int emcore_dir_remove(const char* name); | 
| 125 | 125 | int emcore_errno(uint32_t* emcore_errno_value); | 
| 126 |  | -int emcore_malloc(uint32_t* ptr, const uint32_t size);
 | 
| 127 |  | -int emcore_memalign(uint32_t* ptr, const uint32_t align, const uint32_t size);
 | 
| 128 |  | -int emcore_realloc(uint32_t* new_ptr, const uint32_t ptr, const uint32_t size);
 | 
| 129 |  | -int emcore_reownalloc(const uint32_t ptr, const uint32_t owner);
 | 
| 130 |  | -int emcore_free(const uint32_t ptr);
 | 
|  | 126 | +int emcore_malloc(uint32_t* ptr, uint32_t size); | 
|  | 127 | +int emcore_memalign(uint32_t* ptr, uint32_t align, uint32_t size); | 
|  | 128 | +int emcore_realloc(uint32_t* new_ptr, uint32_t ptr, uint32_t size); | 
|  | 129 | +int emcore_reownalloc(uint32_t ptr, uint32_t owner); | 
|  | 130 | +int emcore_free(uint32_t ptr); | 
| 131 | 131 | int emcore_free_all(void); | 
| 132 | 132 |  | 
| 133 |  | -int emcore_read(void* data, const uint32_t addr, const uint32_t size);
 | 
| 134 |  | -int emcore_write(const void* data, const uint32_t addr, const uint32_t size);
 | 
| 135 |  | -int emcore_ls(const uint32_t handle);
 | 
|  | 133 | +int emcore_read(void* data, uint32_t addr, uint32_t size); | 
|  | 134 | +int emcore_write(const void* data, uint32_t addr, uint32_t size); | 
|  | 135 | +int emcore_ls(uint32_t handle); | 
| 136 | 136 | int emcore_test(void); | 
| 137 | 137 |  | 
| 138 | 138 | #endif /* __EMCORE_H__ */ | 
| Index: emcore/trunk/tools/emcorefs/fuse.c | 
| — | — | @@ -255,9 +255,12 @@ | 
| 256 | 256 | return 0; | 
| 257 | 257 | } | 
| 258 | 258 |  | 
| 259 |  | -int emcorefs_read(const char* path, char* buf, uint32_t size, off_t offset, struct fuse_file_info* fi) {
 | 
|  | 259 | +int emcorefs_read(const char* path, char* buf, size_t size, off_t offset, struct fuse_file_info* fi) { | 
|  | 260 | +#ifdef DEBUG2 | 
| 260 | 261 | fprintf(stderr, "FUSE_READ: path=[%s] size=[%d] offset=[%jd] fi->flags=[%d]\n", path, size, offset, fi->flags); | 
| 261 |  | -
 | 
|  | 262 | +#else | 
|  | 263 | +    (void)path; | 
|  | 264 | +#endif | 
| 262 | 265 | int res; | 
| 263 | 266 | uint32_t emcore_errno_value, addr, nread = size; | 
| 264 | 267 |  | 
| — | — | @@ -346,9 +349,12 @@ | 
| 347 | 350 | return nread; | 
| 348 | 351 | } | 
| 349 | 352 |  | 
| 350 |  | -int emcorefs_write(const char* path, const char* buf, uint32_t size, off_t offset, struct fuse_file_info* fi) {
 | 
|  | 353 | +int emcorefs_write(const char* path, const char* buf, size_t size, off_t offset, struct fuse_file_info* fi) { | 
|  | 354 | +#ifdef DEBUG2 | 
| 351 | 355 | fprintf(stderr, "FUSE_WRITE: path=[%s] size=[%d] offset=[%jd] fi->flags=[%d]\n", path, size, offset, fi->flags); | 
| 352 |  | -
 | 
|  | 356 | +#else | 
|  | 357 | +    (void)path; | 
|  | 358 | +#endif | 
| 353 | 359 | int res; | 
| 354 | 360 | uint32_t emcore_errno_value, addr, nwrite = size; | 
| 355 | 361 |  | 
| Index: emcore/trunk/tools/emcorefs/util.h | 
| — | — | @@ -36,10 +36,10 @@ | 
| 37 | 37 | uint32_t tail; | 
| 38 | 38 | }; | 
| 39 | 39 |  | 
| 40 |  | -void dump_packet(const void* data, const uint32_t length); | 
| 41 |  | -void alignsplit(struct alignsizes* sizeptr, const uint32_t addr, const uint32_t size, const uint32_t blksize, const uint32_t align); | 
| 42 |  | -time_t fat_time_to_unix_ts(const short wrttime, const short wrtdate); | 
| 43 |  | -int32_t unix_ts_to_fat_time(const time_t datetime); | 
| 44 |  | -void print_error(const int code); | 
|  | 40 | +void dump_packet(const void* data, size_t length); | 
|  | 41 | +void alignsplit(struct alignsizes* sizeptr, uint32_t addr, uint32_t size, uint32_t blksize, uint32_t align); | 
|  | 42 | +time_t fat_time_to_unix_ts(short wrttime, short wrtdate); | 
|  | 43 | +int32_t unix_ts_to_fat_time(time_t datetime); | 
|  | 44 | +void print_error(int code); | 
| 45 | 45 |  | 
| 46 | 46 | #endif /* __MISC_H__ */ | 
| Index: emcore/trunk/tools/emcorefs/fuse.h | 
| — | — | @@ -32,8 +32,8 @@ | 
| 33 | 33 | int emcorefs_readdir(const char* path, void* buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info* fi); | 
| 34 | 34 | int emcorefs_releasedir(const char* path, struct fuse_file_info* fi); | 
| 35 | 35 | int emcorefs_open(const char* path, struct fuse_file_info* fi); | 
| 36 |  | -int emcorefs_read(const char* path, char* buf, uint32_t size, off_t offset, struct fuse_file_info* fi);
 | 
| 37 |  | -int emcorefs_write(const char* path, const char* buf, uint32_t size, off_t offset, struct fuse_file_info* fi);
 | 
|  | 36 | +int emcorefs_read(const char* path, char* buf, size_t size, off_t offset, struct fuse_file_info* fi); | 
|  | 37 | +int emcorefs_write(const char* path, const char* buf, size_t size, off_t offset, struct fuse_file_info* fi); | 
| 38 | 38 | int emcorefs_release(const char* path, struct fuse_file_info* fi); | 
| 39 | 39 | int emcorefs_mkdir(const char* path, mode_t mode); | 
| 40 | 40 | int emcorefs_rmdir(const char* path); | 
| Index: emcore/trunk/tools/emcorefs/usb.c | 
| — | — | @@ -58,7 +58,7 @@ | 
| 59 | 59 | return LIBUSB_SUCCESS; | 
| 60 | 60 | } | 
| 61 | 61 |  | 
| 62 |  | -int usb_find(const uint16_t vendor_id, const uint16_t product_id, uint8_t* reattach)
 | 
|  | 62 | +int usb_find(uint16_t vendor_id, uint16_t product_id, uint8_t* reattach) | 
| 63 | 63 | { | 
| 64 | 64 | libusb_device **devs, *dev; | 
| 65 | 65 | ssize_t devs_cnt; | 
| — | — | @@ -289,7 +289,7 @@ | 
| 290 | 290 | return LIBUSB_SUCCESS; | 
| 291 | 291 | } | 
| 292 | 292 |  | 
| 293 |  | -int usb_bulk_transfer(const unsigned char endpoint, void* data, const int length)
 | 
|  | 293 | +int usb_bulk_transfer(unsigned char endpoint, void* data, int length) | 
| 294 | 294 | { | 
| 295 | 295 | int transferred; | 
| 296 | 296 | int res; | 
| — | — | @@ -309,7 +309,7 @@ | 
| 310 | 310 | return LIBUSB_SUCCESS; | 
| 311 | 311 | } | 
| 312 | 312 |  | 
| 313 |  | -int usb_close(const uint8_t reattach) {
 | 
|  | 313 | +int usb_close(uint8_t reattach) { | 
| 314 | 314 | int res; | 
| 315 | 315 |  | 
| 316 | 316 | #ifdef DEBUG | 
| — | — | @@ -364,7 +364,7 @@ | 
| 365 | 365 | libusb_exit(usb_ctx); | 
| 366 | 366 | } | 
| 367 | 367 |  | 
| 368 |  | -int usb_destroy(const uint8_t reattach)
 | 
|  | 368 | +int usb_destroy(uint8_t reattach) | 
| 369 | 369 | { | 
| 370 | 370 | int res = LIBUSB_SUCCESS; | 
| 371 | 371 |  | 
| Index: emcore/trunk/tools/emcorefs/emcore.c | 
| — | — | @@ -31,28 +31,28 @@ | 
| 32 | 32 | struct emcore_usb_endpoints_addr emcore_usb_eps_addr; | 
| 33 | 33 | struct emcore_usb_endpoints_max_packet_size emcore_usb_eps_mps; | 
| 34 | 34 |  | 
| 35 |  | -int emcore_cout(const void* data, const uint32_t length)
 | 
|  | 35 | +int emcore_cout(const void* data, uint32_t length) | 
| 36 | 36 | { | 
| 37 | 37 | return usb_bulk_transfer(emcore_usb_eps_addr.cout, (void*)data, length); | 
| 38 | 38 | } | 
| 39 | 39 |  | 
| 40 |  | -int emcore_cin(void* data, const uint32_t length)
 | 
|  | 40 | +int emcore_cin(void* data, uint32_t length) | 
| 41 | 41 | { | 
| 42 | 42 | return usb_bulk_transfer(emcore_usb_eps_addr.cin, data, length); | 
| 43 | 43 | } | 
| 44 | 44 |  | 
| 45 |  | -int emcore_dout(const void* data, const uint32_t length)
 | 
|  | 45 | +int emcore_dout(const void* data, uint32_t length) | 
| 46 | 46 | { | 
| 47 | 47 | return usb_bulk_transfer(emcore_usb_eps_addr.dout, (void*)data, length); | 
| 48 | 48 | } | 
| 49 | 49 |  | 
| 50 |  | -int emcore_din(void* data, const uint32_t length)
 | 
|  | 50 | +int emcore_din(void* data, uint32_t length) | 
| 51 | 51 | { | 
| 52 | 52 | return usb_bulk_transfer(emcore_usb_eps_addr.din, data, length); | 
| 53 | 53 | } | 
| 54 | 54 |  | 
| 55 | 55 | int emcore_monitor_command(const void* out, void* in, | 
| 56 |  | -    const uint32_t send_length, const uint32_t receive_length)
 | 
|  | 56 | +    uint32_t send_length, uint32_t receive_length) | 
| 57 | 57 | { | 
| 58 | 58 | int res; | 
| 59 | 59 | uint32_t status; | 
| — | — | @@ -170,7 +170,7 @@ | 
| 171 | 171 | return EMCORE_SUCCESS; | 
| 172 | 172 | } | 
| 173 | 173 |  | 
| 174 |  | -int emcore_reset(const uint8_t graceful)
 | 
|  | 174 | +int emcore_reset(uint8_t graceful) | 
| 175 | 175 | { | 
| 176 | 176 | int res; | 
| 177 | 177 | uint32_t out[4] = { 2, 0xdeadbeef, 0, 0 }, in[4]; | 
| — | — | @@ -187,7 +187,7 @@ | 
| 188 | 188 | return EMCORE_SUCCESS; | 
| 189 | 189 | } | 
| 190 | 190 |  | 
| 191 |  | -int emcore_poweroff(const uint8_t graceful)
 | 
|  | 191 | +int emcore_poweroff(uint8_t graceful) | 
| 192 | 192 | { | 
| 193 | 193 | int res; | 
| 194 | 194 | uint32_t out[4] = { 3, 0xdeadbeef, 0, 0 }, in[4]; | 
| — | — | @@ -204,7 +204,7 @@ | 
| 205 | 205 | return EMCORE_SUCCESS; | 
| 206 | 206 | } | 
| 207 | 207 |  | 
| 208 |  | -int emcore_readmem(void* data, const uint32_t addr, const uint32_t size)
 | 
|  | 208 | +int emcore_readmem(void* data, uint32_t addr, uint32_t size) | 
| 209 | 209 | { | 
| 210 | 210 | int res; | 
| 211 | 211 | uint32_t data_length, out[4] = { 4, 0xdeadbeef, 0xdeadbeef, 0 }; | 
| — | — | @@ -233,7 +233,7 @@ | 
| 234 | 234 | return EMCORE_SUCCESS; | 
| 235 | 235 | } | 
| 236 | 236 |  | 
| 237 |  | -int emcore_writemem(const void* data, const uint32_t addr, const uint32_t size)
 | 
|  | 237 | +int emcore_writemem(const void* data, uint32_t addr, uint32_t size) | 
| 238 | 238 | { | 
| 239 | 239 | int res; | 
| 240 | 240 | uint32_t data_length, in[4], *out; | 
| — | — | @@ -262,7 +262,7 @@ | 
| 263 | 263 | return EMCORE_SUCCESS; | 
| 264 | 264 | } | 
| 265 | 265 |  | 
| 266 |  | -int emcore_readdma(void* data, const uint32_t addr, const uint32_t size)
 | 
|  | 266 | +int emcore_readdma(void* data, uint32_t addr, uint32_t size) | 
| 267 | 267 | { | 
| 268 | 268 | int res; | 
| 269 | 269 | uint32_t out[4] = { 6, 0xdeadbeef, 0xdeadbeef, 0 }, in[4]; | 
| — | — | @@ -287,7 +287,7 @@ | 
| 288 | 288 | return EMCORE_SUCCESS; | 
| 289 | 289 | } | 
| 290 | 290 |  | 
| 291 |  | -int emcore_writedma(const void* data, const uint32_t addr, const uint32_t size)
 | 
|  | 291 | +int emcore_writedma(const void* data, uint32_t addr, uint32_t size) | 
| 292 | 292 | { | 
| 293 | 293 | int res; | 
| 294 | 294 | uint32_t out[4] = { 7, 0xdeadbeef, 0xdeadbeef, 0 }, in[4]; | 
| — | — | @@ -312,7 +312,7 @@ | 
| 313 | 313 | return EMCORE_SUCCESS; | 
| 314 | 314 | } | 
| 315 | 315 |  | 
| 316 |  | -int emcore_readi2c(void* data, const uint8_t bus, const uint8_t slave, const uint8_t addr, const uint8_t size)
 | 
|  | 316 | +int emcore_readi2c(void* data, uint8_t bus, uint8_t slave, uint8_t addr, uint8_t size) | 
| 317 | 317 | { | 
| 318 | 318 | int res; | 
| 319 | 319 | uint32_t data_length, out[4] = { 8, 0xdeadbeef, 0, 0 }; | 
| — | — | @@ -340,7 +340,7 @@ | 
| 341 | 341 | return EMCORE_SUCCESS; | 
| 342 | 342 | } | 
| 343 | 343 |  | 
| 344 |  | -int emcore_writei2c(const void* data, const uint8_t bus, const uint8_t slave, const uint8_t addr, const uint8_t size)
 | 
|  | 344 | +int emcore_writei2c(const void* data, uint8_t bus, uint8_t slave, uint8_t addr, uint8_t size) | 
| 345 | 345 | { | 
| 346 | 346 | int res; | 
| 347 | 347 | uint32_t data_length, in[4], *out; | 
| — | — | @@ -371,7 +371,7 @@ | 
| 372 | 372 | return EMCORE_SUCCESS; | 
| 373 | 373 | } | 
| 374 | 374 |  | 
| 375 |  | -int emcore_file_open(uint32_t* handle, const char* path, const int flags)
 | 
|  | 375 | +int emcore_file_open(uint32_t* handle, const char* path, int flags) | 
| 376 | 376 | { | 
| 377 | 377 | int res; | 
| 378 | 378 | uint32_t str_length, data_length, in[4], *out; | 
| — | — | @@ -441,7 +441,7 @@ | 
| 442 | 442 | return EMCORE_SUCCESS; | 
| 443 | 443 | } | 
| 444 | 444 |  | 
| 445 |  | -int emcore_file_size(uint32_t* size, const uint32_t handle)
 | 
|  | 445 | +int emcore_file_size(uint32_t* size, uint32_t handle) | 
| 446 | 446 | { | 
| 447 | 447 | int res; | 
| 448 | 448 | uint32_t out[4] = { 31, 0xdeadbeef, 0, 0 }, in[4]; | 
| — | — | @@ -465,7 +465,7 @@ | 
| 466 | 466 | return EMCORE_SUCCESS; | 
| 467 | 467 | } | 
| 468 | 468 |  | 
| 469 |  | -int emcore_file_read(uint32_t* nread, const uint32_t handle, const uint32_t addr, const uint32_t size)
 | 
|  | 469 | +int emcore_file_read(uint32_t* nread, uint32_t handle, uint32_t addr, uint32_t size) | 
| 470 | 470 | { | 
| 471 | 471 | int res; | 
| 472 | 472 | uint32_t out[4] = { 32, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef }, in[4]; | 
| — | — | @@ -491,7 +491,7 @@ | 
| 492 | 492 | return EMCORE_SUCCESS; | 
| 493 | 493 | } | 
| 494 | 494 |  | 
| 495 |  | -int emcore_file_write(uint32_t* nwrite, const uint32_t handle, const uint32_t addr, const uint32_t size)
 | 
|  | 495 | +int emcore_file_write(uint32_t* nwrite, uint32_t handle, uint32_t addr, uint32_t size) | 
| 496 | 496 | { | 
| 497 | 497 | int res; | 
| 498 | 498 | uint32_t out[4] = { 33, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef }, in[4]; | 
| — | — | @@ -517,7 +517,7 @@ | 
| 518 | 518 | return EMCORE_SUCCESS; | 
| 519 | 519 | } | 
| 520 | 520 |  | 
| 521 |  | -int emcore_file_seek(const uint32_t handle, const uint32_t offset, const uint32_t whence)
 | 
|  | 521 | +int emcore_file_seek(uint32_t handle, uint32_t offset, uint32_t whence) | 
| 522 | 522 | { | 
| 523 | 523 | int res; | 
| 524 | 524 | uint32_t out[4] = { 34, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef }, in[4]; | 
| — | — | @@ -541,7 +541,7 @@ | 
| 542 | 542 | return EMCORE_SUCCESS; | 
| 543 | 543 | } | 
| 544 | 544 |  | 
| 545 |  | -int emcore_file_truncate(const uint32_t handle, const uint32_t length)
 | 
|  | 545 | +int emcore_file_truncate(uint32_t handle, uint32_t length) | 
| 546 | 546 | { | 
| 547 | 547 | int res; | 
| 548 | 548 | uint32_t out[4] = { 35, 0xdeadbeef, 0xdeadbeef, 0 }, in[4]; | 
| — | — | @@ -564,7 +564,7 @@ | 
| 565 | 565 | return EMCORE_SUCCESS; | 
| 566 | 566 | } | 
| 567 | 567 |  | 
| 568 |  | -int emcore_file_sync(const uint32_t handle)
 | 
|  | 568 | +int emcore_file_sync(uint32_t handle) | 
| 569 | 569 | { | 
| 570 | 570 | int res; | 
| 571 | 571 | uint32_t out[4] = { 36, 0xdeadbeef, 0, 0 }, in[4]; | 
| — | — | @@ -586,7 +586,7 @@ | 
| 587 | 587 | return EMCORE_SUCCESS; | 
| 588 | 588 | } | 
| 589 | 589 |  | 
| 590 |  | -int emcore_file_close(const uint32_t handle)
 | 
|  | 590 | +int emcore_file_close(uint32_t handle) | 
| 591 | 591 | { | 
| 592 | 592 | int res; | 
| 593 | 593 | uint32_t out[4] = { 37, 0xdeadbeef, 0, 0 }, in[4]; | 
| — | — | @@ -630,7 +630,7 @@ | 
| 631 | 631 | return EMCORE_SUCCESS; | 
| 632 | 632 | } | 
| 633 | 633 |  | 
| 634 |  | -int emcore_file_kill_all(const uint32_t volume)
 | 
|  | 634 | +int emcore_file_kill_all(uint32_t volume) | 
| 635 | 635 | { | 
| 636 | 636 | int res; | 
| 637 | 637 | uint32_t out[4] = { 39, 0xdeadbeef, 0, 0 }, in[4]; | 
| — | — | @@ -751,7 +751,7 @@ | 
| 752 | 752 | return EMCORE_SUCCESS; | 
| 753 | 753 | } | 
| 754 | 754 |  | 
| 755 |  | -int emcore_dir_read(struct emcore_dir_entry* entry, const uint32_t handle)
 | 
|  | 755 | +int emcore_dir_read(struct emcore_dir_entry* entry, uint32_t handle) | 
| 756 | 756 | { | 
| 757 | 757 | int res; | 
| 758 | 758 | uint32_t maxpath, ptr, dirent_size, emcore_errno_value, filename_buf_len, | 
| — | — | @@ -825,7 +825,7 @@ | 
| 826 | 826 | return EMCORE_SUCCESS; | 
| 827 | 827 | } | 
| 828 | 828 |  | 
| 829 |  | -int emcore_dir_close(const uint32_t handle)
 | 
|  | 829 | +int emcore_dir_close(uint32_t handle) | 
| 830 | 830 | { | 
| 831 | 831 | int res; | 
| 832 | 832 | uint32_t out[4] = { 44, 0xdeadbeef, 0, 0 }, in[4]; | 
| — | — | @@ -954,7 +954,7 @@ | 
| 955 | 955 | return EMCORE_SUCCESS; | 
| 956 | 956 | } | 
| 957 | 957 |  | 
| 958 |  | -int emcore_malloc(uint32_t* ptr, const uint32_t size)
 | 
|  | 958 | +int emcore_malloc(uint32_t* ptr, uint32_t size) | 
| 959 | 959 | { | 
| 960 | 960 | int res; | 
| 961 | 961 | uint32_t out[4] = { 52, 0xdeadbeef, 0, 0 }, in[4]; | 
| — | — | @@ -973,7 +973,7 @@ | 
| 974 | 974 | return EMCORE_SUCCESS; | 
| 975 | 975 | } | 
| 976 | 976 |  | 
| 977 |  | -int emcore_memalign(uint32_t* ptr, const uint32_t align, const uint32_t size)
 | 
|  | 977 | +int emcore_memalign(uint32_t* ptr, uint32_t align, uint32_t size) | 
| 978 | 978 | { | 
| 979 | 979 | int res; | 
| 980 | 980 | uint32_t out[4] = { 53, 0xdeadbeef, 0xdeadbeef, 0 }, in[4]; | 
| — | — | @@ -993,7 +993,7 @@ | 
| 994 | 994 | return EMCORE_SUCCESS; | 
| 995 | 995 | } | 
| 996 | 996 |  | 
| 997 |  | -int emcore_realloc(uint32_t* new_ptr, const uint32_t ptr, const uint32_t size)
 | 
|  | 997 | +int emcore_realloc(uint32_t* new_ptr, uint32_t ptr, uint32_t size) | 
| 998 | 998 | { | 
| 999 | 999 | int res; | 
| 1000 | 1000 | uint32_t out[4] = { 54, 0xdeadbeef, 0xdeadbeef, 0 }, in[4]; | 
| — | — | @@ -1013,7 +1013,7 @@ | 
| 1014 | 1014 | return EMCORE_SUCCESS; | 
| 1015 | 1015 | } | 
| 1016 | 1016 |  | 
| 1017 |  | -int emcore_reownalloc(const uint32_t ptr, const uint32_t owner)
 | 
|  | 1017 | +int emcore_reownalloc(uint32_t ptr, uint32_t owner) | 
| 1018 | 1018 | { | 
| 1019 | 1019 | uint32_t out[4] = { 55, 0xdeadbeef, 0xdeadbeef, 0 }, in[4]; | 
| 1020 | 1020 |  | 
| — | — | @@ -1023,7 +1023,7 @@ | 
| 1024 | 1024 | return emcore_monitor_command(out, in, 16, 16); | 
| 1025 | 1025 | } | 
| 1026 | 1026 |  | 
| 1027 |  | -int emcore_free(const uint32_t ptr)
 | 
|  | 1027 | +int emcore_free(uint32_t ptr) | 
| 1028 | 1028 | { | 
| 1029 | 1029 | uint32_t out[4] = { 56, 0xdeadbeef, 0, 0 }, in[4]; | 
| 1030 | 1030 |  | 
| — | — | @@ -1039,7 +1039,7 @@ | 
| 1040 | 1040 | return emcore_monitor_command(out, in, 16, 16); | 
| 1041 | 1041 | } | 
| 1042 | 1042 |  | 
| 1043 |  | -int emcore_read(void* data, const uint32_t addr, const uint32_t size)
 | 
|  | 1043 | +int emcore_read(void* data, uint32_t addr, uint32_t size) | 
| 1044 | 1044 | { | 
| 1045 | 1045 | int res; | 
| 1046 | 1046 | struct alignsizes* sizes; | 
| — | — | @@ -1107,7 +1107,7 @@ | 
| 1108 | 1108 | return EMCORE_SUCCESS; | 
| 1109 | 1109 | } | 
| 1110 | 1110 |  | 
| 1111 |  | -int emcore_write(const void* data, const uint32_t addr, const uint32_t size)
 | 
|  | 1111 | +int emcore_write(const void* data, uint32_t addr, uint32_t size) | 
| 1112 | 1112 | { | 
| 1113 | 1113 | int res; | 
| 1114 | 1114 | struct alignsizes* sizes; | 
| — | — | @@ -1175,7 +1175,7 @@ | 
| 1176 | 1176 | return EMCORE_SUCCESS; | 
| 1177 | 1177 | } | 
| 1178 | 1178 |  | 
| 1179 |  | -int emcore_ls(const uint32_t handle)
 | 
|  | 1179 | +int emcore_ls(uint32_t handle) | 
| 1180 | 1180 | { | 
| 1181 | 1181 | int res = 0; | 
| 1182 | 1182 | struct emcore_dir_entry entry; | 
| Index: emcore/trunk/tools/emcorefs/util.c | 
| — | — | @@ -57,7 +57,7 @@ | 
| 58 | 58 | "I/O error",              /* EMCORE_ERROR_IO = 9              */ | 
| 59 | 59 | }; | 
| 60 | 60 |  | 
| 61 |  | -void dump_packet(const void* data, const size_t length)
 | 
|  | 61 | +void dump_packet(const void* data, size_t length) | 
| 62 | 62 | { | 
| 63 | 63 | static size_t i; | 
| 64 | 64 |  | 
| — | — | @@ -79,8 +79,8 @@ | 
| 80 | 80 | fprintf(stderr, "\n"); | 
| 81 | 81 | } | 
| 82 | 82 |  | 
| 83 |  | -void alignsplit(struct alignsizes* sizeptr, const uint32_t addr,
 | 
| 84 |  | -    const uint32_t size, const uint32_t blksize, const uint32_t align)
 | 
|  | 83 | +void alignsplit(struct alignsizes* sizeptr, uint32_t addr, | 
|  | 84 | +    uint32_t size, uint32_t blksize, uint32_t align) | 
| 85 | 85 | { | 
| 86 | 86 | uint32_t end, bodyaddr, tailaddr; | 
| 87 | 87 |  | 
| — | — | @@ -121,7 +121,7 @@ | 
| 122 | 122 | return; | 
| 123 | 123 | } | 
| 124 | 124 |  | 
| 125 |  | -time_t fat_time_to_unix_ts(const short wrttime, const short wrtdate)
 | 
|  | 125 | +time_t fat_time_to_unix_ts(short wrttime, short wrtdate) | 
| 126 | 126 | { | 
| 127 | 127 | struct tm result; | 
| 128 | 128 | /* | 
| — | — | @@ -148,7 +148,7 @@ | 
| 149 | 149 | return mktime(&result); | 
| 150 | 150 | } | 
| 151 | 151 |  | 
| 152 |  | -int32_t unix_ts_to_fat_time(const time_t datetime)
 | 
|  | 152 | +int32_t unix_ts_to_fat_time(time_t datetime) | 
| 153 | 153 | { | 
| 154 | 154 | struct tm* tm_ptr; | 
| 155 | 155 |  | 
| — | — | @@ -162,7 +162,7 @@ | 
| 163 | 163 | ((tm_ptr->tm_year - 80) << 0x19); | 
| 164 | 164 | } | 
| 165 | 165 |  | 
| 166 |  | -void print_error(const int code)
 | 
|  | 166 | +void print_error(int code) | 
| 167 | 167 | { | 
| 168 | 168 | if (code > 0) | 
| 169 | 169 | { |