Changes in uspace/app/bdsh/cmds/modules/cmp/cmp.c [b7fd2a0:8e3498b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cmp/cmp.c
rb7fd2a0 r8e3498b 70 70 } 71 71 72 static errno_t cmp_files(const char *fn0, const char *fn1)72 static int cmp_files(const char *fn0, const char *fn1) 73 73 { 74 errno_t rc = EOK;74 int rc = EOK; 75 75 const char *fn[2] = {fn0, fn1}; 76 76 int fd[2] = {-1, -1}; … … 80 80 81 81 for (int i = 0; i < 2; i++) { 82 rc = vfs_lookup_open(fn[i], WALK_REGULAR, MODE_READ, &(fd[i])); 83 if (rc != EOK) { 82 fd[i] = vfs_lookup_open(fn[i], WALK_REGULAR, MODE_READ); 83 if (fd[i] < 0) { 84 rc = fd[i]; 84 85 printf("Unable to open %s\n", fn[i]); 85 86 goto end; … … 101 102 memcmp(buffer[0], buffer[1], offset[0]) != 0) { 102 103 printf("Return 1\n"); 103 rc = EBUSY;104 rc = 1; 104 105 goto end; 105 106 } … … 117 118 int cmd_cmp(char **argv) 118 119 { 119 errno_t rc;120 int rc; 120 121 unsigned int argc; 121 122 int c, opt_ind;
Note:
See TracChangeset
for help on using the changeset viewer.