--- genext2fs.c.orig Tue Apr 15 19:04:20 2003 +++ genext2fs.c Tue Apr 15 19:05:15 2003 @@ -565,10 +565,12 @@ static char *xreadlink(const char *path) int bufsize = 0, readsize = 0; do { - buf = xrealloc(buf, bufsize += GROWBY); + buf = realloc(buf, bufsize += GROWBY); + if (!buf) + error_msg_and_die(memory_exhausted); readsize = readlink(path, buf, bufsize); /* 1st try */ if (readsize == -1) { - perror_msg_and_die("%s:%s", progname, path); + perror_msg_and_die("%s:%s", app_name, path); } } while (bufsize < readsize + 1); @@ -2000,8 +2002,6 @@ static int interpret_table_entry(filesys #endif break; case 'p': - error_msg("ignoring entry %s", name); - break; case 'c': case 'b': if (count > 0) { @@ -2019,21 +2019,25 @@ static int interpret_table_entry(filesys add2dir(fs, parent, nod, dname, mode, uid, gid, time(NULL)); entry = get_nod(fs, nod); } - entry->i_uid = uid; - entry->i_gid = gid; - entry->i_mode = mode; - rdev = makedev(major, minor + (i * increment - start)); - ((uint8*)entry->i_block)[0] = (rdev & 0xff); - ((uint8*)entry->i_block)[1] = (rdev >> 8); + if (type != 'p') { + entry->i_uid = uid; + entry->i_gid = gid; + entry->i_mode = mode; + rdev = makedev(major, minor + (i * increment - start)); + ((uint8*)entry->i_block)[0] = (rdev & 0xff); + ((uint8*)entry->i_block)[1] = (rdev >> 8); + } free(dname); } } else { dev_t rdev = makedev(major, minor); nod = alloc_nod(fs); add2dir(fs, parent, nod, bname, mode, uid, gid, time(NULL)); - entry = get_nod(fs, nod); - ((uint8*)entry->i_block)[0] = (rdev & 0xff); - ((uint8*)entry->i_block)[1] = (rdev >> 8); + if (type != 'p') { + entry = get_nod(fs, nod); + ((uint8*)entry->i_block)[0] = (rdev & 0xff); + ((uint8*)entry->i_block)[1] = (rdev >> 8); + } } break; default: