View | Details | Raw Unified | Return to bug 195108
Collapse All | Expand All

(-)b/sbin/restore/dirs.c (-1 / +1 lines)
Lines 626-636 setdirmodes(int flags) Link Here
626
		}
626
		}
627
		ep = lookupino(node.ino);
627
		ep = lookupino(node.ino);
628
		if (command == 'i' || command == 'x') {
628
		if (command == 'i' || command == 'x') {
629
			if (ep == NULL)
629
			if (ep == NULL)
630
				continue;
630
				continue;
631
			if ((flags & FORCE) == 0 && ep->e_flags & EXISTED) {
631
			if ((flags & FORCE) == 0 && (ep->e_flags & EXISTED) != 0) {
632
				ep->e_flags &= ~NEW;
632
				ep->e_flags &= ~NEW;
633
				continue;
633
				continue;
634
			}
634
			}
635
			if (node.ino == ROOTINO &&
635
			if (node.ino == ROOTINO &&
636
		   	    reply("set owner/mode for '.'") == FAIL)
636
		   	    reply("set owner/mode for '.'") == FAIL)
(-)b/sbin/restore/tape.c (-3 / +3 lines)
Lines 1442-1453 gethead(struct s_spcl *buf) Link Here
1442
	/*
1442
	/*
1443
	 * If we're restoring a filesystem with the old (FreeBSD 1)
1443
	 * If we're restoring a filesystem with the old (FreeBSD 1)
1444
	 * format inodes, copy the uid/gid to the new location
1444
	 * format inodes, copy the uid/gid to the new location
1445
	 */
1445
	 */
1446
	if (oldinofmt) {
1446
	if (oldinofmt) {
1447
		buf->c_uid = buf->c_spare1[1];
1447
		/* Cast to avoid sign-extend (c_spare1 is signed). */
1448
		buf->c_gid = buf->c_spare1[2];
1448
		buf->c_uid = (uint16_t)buf->c_spare1[1];
1449
		buf->c_gid = (uint16_t)buf->c_spare1[2];
1449
	}
1450
	}
1450
	buf->c_magic = FS_UFS2_MAGIC;
1451
	buf->c_magic = FS_UFS2_MAGIC;
1451
	tapeaddr = buf->c_tapea;
1452
	tapeaddr = buf->c_tapea;
1452
	if (dflag)
1453
	if (dflag)
1453
		accthdr(buf);
1454
		accthdr(buf);
1454
- 

Return to bug 195108