Deleted Added
full compact
mount_unionfs.c (164829) mount_unionfs.c (164875)
1/*-
2 * Copyright (c) 1992, 1993, 1994
3 * The Regents of the University of California.
4 * Copyright (c) 2005, 2006 Masanori Ozawa <ozawa@ongs.co.jp>, ONGS Inc.
5 * Copyright (c) 2006 Daichi Goto <daichi@freebsd.org>
6 * All rights reserved.
7 *
8 * This code is derived from software donated to Berkeley by

--- 30 unchanged lines hidden (view full) ---

39 The Regents of the University of California. All rights reserved.\n";
40#endif /* not lint */
41
42#ifndef lint
43#if 0
44static char sccsid[] = "@(#)mount_union.c 8.5 (Berkeley) 3/27/94";
45#else
46static const char rcsid[] =
1/*-
2 * Copyright (c) 1992, 1993, 1994
3 * The Regents of the University of California.
4 * Copyright (c) 2005, 2006 Masanori Ozawa <ozawa@ongs.co.jp>, ONGS Inc.
5 * Copyright (c) 2006 Daichi Goto <daichi@freebsd.org>
6 * All rights reserved.
7 *
8 * This code is derived from software donated to Berkeley by

--- 30 unchanged lines hidden (view full) ---

39 The Regents of the University of California. All rights reserved.\n";
40#endif /* not lint */
41
42#ifndef lint
43#if 0
44static char sccsid[] = "@(#)mount_union.c 8.5 (Berkeley) 3/27/94";
45#else
46static const char rcsid[] =
47 "$FreeBSD: head/sbin/mount_unionfs/mount_unionfs.c 164829 2006-12-02 19:35:56Z rodrigc $";
47 "$FreeBSD: head/sbin/mount_unionfs/mount_unionfs.c 164875 2006-12-04 14:05:42Z maxim $";
48#endif
49#endif /* not lint */
50
51#include <sys/param.h>
52#include <sys/mount.h>
53#include <sys/uio.h>
54#include <sys/errno.h>
55

--- 45 unchanged lines hidden (view full) ---

101 errx(EX_NOUSER, "unknown group id: %s", s);
102 usage();
103 } else {
104 strncpy(buf, s, bufsize);
105 }
106 }
107}
108
48#endif
49#endif /* not lint */
50
51#include <sys/param.h>
52#include <sys/mount.h>
53#include <sys/uio.h>
54#include <sys/errno.h>
55

--- 45 unchanged lines hidden (view full) ---

101 errx(EX_NOUSER, "unknown group id: %s", s);
102 usage();
103 } else {
104 strncpy(buf, s, bufsize);
105 }
106 }
107}
108
109static uid_t
109static void
110parse_uid(const char *s, char *buf, size_t bufsize)
111{
112 struct passwd *pw;
113 char *inval;
114
115 if ((pw = getpwnam(s)) != NULL)
116 snprintf(buf, bufsize, "%d", pw->pw_uid);
117 else {

--- 76 unchanged lines hidden ---
110parse_uid(const char *s, char *buf, size_t bufsize)
111{
112 struct passwd *pw;
113 char *inval;
114
115 if ((pw = getpwnam(s)) != NULL)
116 snprintf(buf, bufsize, "%d", pw->pw_uid);
117 else {

--- 76 unchanged lines hidden ---