Ignore:
Timestamp:
Jul 12, 2011, 11:52:39 AM (14 years ago)
Author:
bird
Message:

kmkbuiltins: More specific error messages (solaris EINTR).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/cp_utils.c

    r2192 r2466  
    9898
    9999        if ((from_fd = open(entp->fts_path, O_RDONLY | O_BINARY, 0)) == -1) {
    100                 warn("%s", entp->fts_path);
     100                warn("open: %s", entp->fts_path);
    101101                return (1);
    102102        }
     
    124124                                close(from_fd);
    125125                                if ((from_fd = open(entp->fts_path, O_RDONLY | O_BINARY, 0)) == -1) {
    126                                         warn("%s", entp->fts_path);
     126                                        warn("open: %s", entp->fts_path);
    127127                                        return (1);
    128128                                }
     
    162162
    163163        if (to_fd == -1) {
    164                 warn("%s", to.p_path);
     164                warn("open: %s", to.p_path);
    165165                (void)close(from_fd);
    166166                return (1);
     
    180180                if ((p = mmap(NULL, (size_t)fs->st_size, PROT_READ,
    181181                    MAP_SHARED, from_fd, (off_t)0)) == MAP_FAILED) {
    182                         warn("%s", entp->fts_path);
     182                        warn("mmap: %s", entp->fts_path);
    183183                        rval = 1;
    184184                } else {
     
    200200                        }
    201201                        if (wcount != (ssize_t)wresid) {
    202                                 warn("%s", to.p_path);
     202                                warn("write[%zd != %zu]: %s", wcount, wresid, to.p_path);
    203203                                rval = 1;
    204204                        }
    205205                        /* Some systems don't unmap on close(2). */
    206206                        if (munmap(p, fs->st_size) < 0) {
    207                                 warn("%s", entp->fts_path);
     207                                warn("munmap: %s", entp->fts_path);
    208208                                rval = 1;
    209209                        }
     
    230230                        }
    231231                        if (wcount != (ssize_t)wresid) {
    232                                 warn("%s", to.p_path);
     232                                warn("write[%zd != %zu]: %s", wcount, wresid, to.p_path);
    233233                                rval = 1;
    234234                                break;
     
    236236                }
    237237                if (rcount < 0) {
    238                         warn("%s", entp->fts_path);
     238                        warn("read: %s", entp->fts_path);
    239239                        rval = 1;
    240240                }
     
    252252        (void)close(from_fd);
    253253        if (close(to_fd)) {
    254                 warn("%s", to.p_path);
     254                warn("close: %s", to.p_path);
    255255                rval = 1;
    256256        }
Note: See TracChangeset for help on using the changeset viewer.