/branches/dd/uspace/app/bdsh/cmds/modules/cp/cp.c |
---|
172,7 → 172,8 |
int cmd_cp(char **argv) |
{ |
unsigned int argc, buffer = 0, verbose = 0; |
unsigned int argc, verbose = 0; |
int buffer = 0; |
int c, opt_ind; |
int64_t ret; |
/branches/dd/uspace/app/bdsh/cmds/modules/ls/ls.c |
---|
89,7 → 89,8 |
struct stat s; |
int rc; |
if (rc = stat(pathname, &s)) { |
rc = stat(pathname, &s); |
if (rc != 0) { |
/* Odd chance it was deleted from the time readdir() found it */ |
printf("ls: skipping bogus node %s\n", pathname); |
printf("rc=%d\n", rc); |
/branches/dd/uspace/app/bdsh/cmds/modules/ls/ls.h |
---|
6,8 → 6,6 |
#define LS_FILE 1 |
#define LS_DIR 2 |
static unsigned int ls_scope(const char *); |
static void ls_scan_dir(const char *, DIR *); |
static void ls_print(const char *, const char *); |
/branches/dd/uspace/app/bdsh/cmds/modules/rm/rm.c |
---|
209,7 → 209,7 |
} |
} |
if (optind == argc) { |
if ((unsigned) optind == argc) { |
cli_error(CL_EFAIL, |
"%s: insufficient arguments. Try %s --help", cmdname, cmdname); |
rm_end(&rm); |
/branches/dd/uspace/app/init/init.c |
---|
202,7 → 202,7 |
} |
} |
void mount_data(void) |
static void mount_data(void) |
{ |
int rc; |
245,9 → 245,14 |
#ifdef CONFIG_START_BD |
srv_start("/srv/ata_bd"); |
srv_start("/srv/gxe_bd"); |
#else |
(void) srv_start; |
#endif |
#ifdef CONFIG_MOUNT_DATA |
mount_data(); |
#else |
(void) mount_data; |
#endif |
getvc("vc0", "/app/bdsh"); |
/branches/dd/uspace/app/tester/thread/thread1.c |
---|
38,7 → 38,6 |
static atomic_t finish; |
static atomic_t threads_finished; |
static bool sh_quiet; |
static void threadtest(void *data) |
{ |
53,7 → 52,7 |
char *test_thread1(void) |
{ |
unsigned int i; |
unsigned int total = 0; |
int total = 0; |
atomic_set(&finish, 1); |
atomic_set(&threads_finished, 0); |
/branches/dd/uspace/app/tetris/shapes.c |
---|
87,7 → 87,7 |
*/ |
int fits_in(const struct shape *shape, int pos) |
{ |
int *o = shape->off; |
const int *o = shape->off; |
if ((board[pos]) || (board[pos + *o++]) || (board[pos + *o++]) || |
(board[pos + *o])) |
102,7 → 102,7 |
*/ |
void place(const struct shape *shape, int pos, int onoff) |
{ |
int *o = shape->off; |
const int *o = shape->off; |
board[pos] = onoff ? shape->color : 0x000000; |
board[pos + *o++] = onoff ? shape->color : 0x000000; |
/branches/dd/uspace/app/tetris/tetris.c |
---|
237,7 → 237,7 |
{ |
int pos; |
int c; |
char *keys; |
const char *keys; |
int level = 2; |
char key_write[6][10]; |
int i; |
/branches/dd/uspace/app/trace/trace.c |
---|
206,6 → 206,10 |
void val_print(sysarg_t val, val_type_t v_type) |
{ |
long sval; |
sval = (long) val; |
switch (v_type) { |
case V_VOID: |
printf("<void>"); |
212,7 → 216,7 |
break; |
case V_INTEGER: |
printf("%ld", val); |
printf("%ld", sval); |
break; |
case V_HASH: |
221,29 → 225,29 |
break; |
case V_ERRNO: |
if (val >= -15 && val <= 0) { |
printf("%ld %s (%s)", val, |
err_desc[-val].name, |
err_desc[-val].desc); |
if (sval >= -15 && sval <= 0) { |
printf("%ld %s (%s)", sval, |
err_desc[-sval].name, |
err_desc[-sval].desc); |
} else { |
printf("%ld", val); |
printf("%ld", sval); |
} |
break; |
case V_INT_ERRNO: |
if (val >= -15 && val < 0) { |
printf("%ld %s (%s)", val, |
err_desc[-val].name, |
err_desc[-val].desc); |
if (sval >= -15 && sval < 0) { |
printf("%ld %s (%s)", sval, |
err_desc[-sval].name, |
err_desc[-sval].desc); |
} else { |
printf("%ld", val); |
printf("%ld", sval); |
} |
break; |
case V_CHAR: |
if (val >= 0x20 && val < 0x7f) { |
printf("'%c'", val); |
if (sval >= 0x20 && sval < 0x7f) { |
printf("'%c'", sval); |
} else { |
switch (val) { |
switch (sval) { |
case '\a': printf("'\\a'"); break; |
case '\b': printf("'\\b'"); break; |
case '\n': printf("'\\n'"); break; |
282,7 → 286,8 |
ipc_call_t call; |
ipcarg_t phoneid; |
if (sc_rc == IPC_CALLRET_FATAL || sc_rc == IPC_CALLRET_TEMPORARY) |
if (sc_rc == (sysarg_t) IPC_CALLRET_FATAL || |
sc_rc == (sysarg_t) IPC_CALLRET_TEMPORARY) |
return; |
phoneid = sc_args[0]; |
302,7 → 307,8 |
ipc_call_t call; |
int rc; |
if (sc_rc == IPC_CALLRET_FATAL || sc_rc == IPC_CALLRET_TEMPORARY) |
if (sc_rc == (sysarg_t) IPC_CALLRET_FATAL || |
sc_rc == (sysarg_t) IPC_CALLRET_TEMPORARY) |
return; |
memset(&call, 0, sizeof(call)); |
343,11 → 349,13 |
static void sc_ipc_call_sync_slow_b(unsigned thread_id, sysarg_t *sc_args) |
{ |
ipc_call_t question, reply; |
ipc_call_t question; |
int rc; |
memset(&question, 0, sizeof(question)); |
rc = udebug_mem_read(phoneid, &question.args, sc_args[1], sizeof(question.args)); |
rc = udebug_mem_read(phoneid, &question.args, sc_args[1], |
sizeof(question.args)); |
if (rc < 0) { |
printf("Error: mem_read->%d\n", rc); |
return; |
358,11 → 366,13 |
static void sc_ipc_call_sync_slow_e(unsigned thread_id, sysarg_t *sc_args) |
{ |
ipc_call_t question, reply; |
ipc_call_t reply; |
int rc; |
memset(&reply, 0, sizeof(reply)); |
rc = udebug_mem_read(phoneid, &reply.args, sc_args[2], sizeof(reply.args)); |
rc = udebug_mem_read(phoneid, &reply.args, sc_args[2], |
sizeof(reply.args)); |
if (rc < 0) { |
printf("Error: mem_read->%d\n", rc); |
return; |
/branches/dd/uspace/app/trace/proto.c |
---|
46,7 → 46,7 |
hash_table_t srv_proto; |
typedef struct { |
int srv; |
unsigned srv; |
proto_t *proto; |
link_t link; |
} srv_proto_t; |