From owner-freebsd-questions Thu Jan 17 14: 0:33 2002 Delivered-To: freebsd-questions@freebsd.org Received: from lists.blarg.net (lists.blarg.net [206.124.128.17]) by hub.freebsd.org (Postfix) with ESMTP id 1640B37B419 for ; Thu, 17 Jan 2002 14:00:23 -0800 (PST) Received: from thig.blarg.net (thig.blarg.net [206.124.128.18]) by lists.blarg.net (Postfix) with ESMTP id B618DBD3F; Thu, 17 Jan 2002 14:00:22 -0800 (PST) Received: from localhost.localdomain ([206.124.139.115]) by thig.blarg.net (8.9.3/8.9.3) with ESMTP id OAA08179; Thu, 17 Jan 2002 14:00:22 -0800 Received: (from jojo@localhost) by localhost.localdomain (8.11.6/8.11.3) id g0HM2m607172; Thu, 17 Jan 2002 14:02:48 -0800 (PST) (envelope-from swear@blarg.net) To: "Mike Meyer" Cc: questions@FreeBSD.ORG Subject: Re: HOWTO -- backup onto CDRs? References: <15430.12944.372926.781882@guru.mired.org> From: swear@blarg.net (Gary W. Swearingen) Date: 17 Jan 2002 14:02:48 -0800 In-Reply-To: <15430.12944.372926.781882@guru.mired.org> Message-ID: Lines: 38 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "Mike Meyer" writes: > Gary W. Swearingen types: > > Looks like /usr/include/sys/stat.h has the definitive list and it adds > > something called a "whiteout". Never heard of it; maybe it's not > > supported by other code, or just used by the system software. (The > > "find" man page agrees with perl.) > > They get mentioned in the rm and mknod(2) man pages. Find actually > knows about them - it's "-type w", even though it's not documented. Oooo. Thank you very much for that. Not that I care much about whiteouts, but the whiteout mention in mknod(2) explains why "afio" has a bug. It's trying to use mknod(2) to create a socket and that's said there to not be supported. (Don't ask me why it even archives sockets (and FIFOs/pipes); I haven't a clue.) Anybody care to fix this (from afio-2.4.7 afio.c) to create a socket file (where asb->sb_mode has bits set for socket file type): fd = 0; if (exists) if (perm != operm && chmod (name, perm) < 0) return (warn (name, syserr ())); else { ; } else if (mknod (name, asb->sb_mode, (dev_t) 0) < 0 && (errno != ENOENT || dirneed (name) < 0 || mknod (name, asb->sb_mode, (dev_t) 0) < 0)) return (warn (name, syserr ())); Or just name the functions for creating a socket file or a function which has code similar to the above but for sockets. I'm not a C coder. (That "dirneed" creates missing directories.) I'm not sure if I'll code and test a fix or just pass it on to the port or source maintainer (who doesn't do FreeBSD). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message