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