summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-08-07 20:18:55 +0000
committerdim <dim@FreeBSD.org>2015-08-07 20:18:55 +0000
commita8620477800b3024434869fa89d7809f2ff13d6a (patch)
treea5d6dd240c495dd4fcb480802d5dbb071e807d63 /usr.bin
parenta7d397c2d758290d83eeec3198724bcc9153e1ac (diff)
parent4c6e75e399092eee840af6c4753849ead0774993 (diff)
downloadFreeBSD-src-a8620477800b3024434869fa89d7809f2ff13d6a.zip
FreeBSD-src-a8620477800b3024434869fa89d7809f2ff13d6a.tar.gz
Merge ^/head r285924 through r286421.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ar/ar.11
-rw-r--r--usr.bin/ar/ar.c24
-rw-r--r--usr.bin/brandelf/brandelf.12
-rw-r--r--usr.bin/calendar/calendars/calendar.freebsd1
-rw-r--r--usr.bin/elfcopy/Makefile12
-rw-r--r--usr.bin/find/extern.h2
-rw-r--r--usr.bin/find/misc.c38
-rw-r--r--usr.bin/getopt/getopt.112
-rw-r--r--usr.bin/ipcrm/ipcrm.c28
-rw-r--r--usr.bin/mkimg/image.c12
-rw-r--r--usr.bin/mkimg/image.h1
-rw-r--r--usr.bin/mkimg/mkimg.184
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.gz.uu29
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.gz.uu26
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-ebr.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu36
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-mbr.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-pc98.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.gz.uu26
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-apm.vhd.gz.uu29
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.gz.uu26
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-ebr.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.gz.uu36
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-mbr.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-pc98.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.gz.uu26
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-bsd.vhd.gz.uu26
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.gz.uu36
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu29
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-apm.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.gz.uu26
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-ebr.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.gz.uu37
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu29
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.gz.uu28
-rw-r--r--usr.bin/mkimg/vhd.c92
-rw-r--r--usr.bin/patch/common.h6
-rw-r--r--usr.bin/patch/inp.c100
-rw-r--r--usr.bin/patch/pathnames.h2
-rw-r--r--usr.bin/patch/pch.c18
-rw-r--r--usr.bin/truss/syscall.h2
-rw-r--r--usr.bin/truss/syscalls.c276
-rw-r--r--usr.bin/vgrind/vgrindefs.c322
-rw-r--r--usr.bin/wall/ttymsg.c4
-rw-r--r--usr.bin/xargs/xargs.17
-rw-r--r--usr.bin/xargs/xargs.c15
-rw-r--r--usr.bin/ypcat/ypcat.c63
-rw-r--r--usr.bin/ypmatch/ypmatch.c70
-rw-r--r--usr.bin/ypwhich/ypwhich.c2
54 files changed, 1014 insertions, 991 deletions
diff --git a/usr.bin/ar/ar.1 b/usr.bin/ar/ar.1
index 02e99f1..6998c04 100644
--- a/usr.bin/ar/ar.1
+++ b/usr.bin/ar/ar.1
@@ -210,6 +210,7 @@ and 0644 instead of file mode from the members named by arguments
.Ar .
This ensures that checksums on the resulting archives are reproducible
when member contents are identical.
+This option is enabled by default.
If multiple
.Fl D
and
diff --git a/usr.bin/ar/ar.c b/usr.bin/ar/ar.c
index 3d5e2b8..4dee029 100644
--- a/usr.bin/ar/ar.c
+++ b/usr.bin/ar/ar.c
@@ -100,10 +100,12 @@ main(int argc, char **argv)
struct bsdar *bsdar, bsdar_storage;
char *p;
size_t len;
- int i, opt;
+ int i, opt, Dflag, Uflag;
bsdar = &bsdar_storage;
memset(bsdar, 0, sizeof(*bsdar));
+ Dflag = 0;
+ Uflag = 0;
if ((bsdar->progname = getprogname()) == NULL)
bsdar->progname = "ar";
@@ -120,10 +122,12 @@ main(int argc, char **argv)
/* Ignored. */
break;
case 'D':
- bsdar->options |= AR_D;
+ Dflag = 1;
+ Uflag = 0;
break;
case 'U':
- bsdar->options &= ~AR_D;
+ Uflag = 1;
+ Dflag = 0;
break;
case 'V':
ranlib_version();
@@ -180,7 +184,8 @@ main(int argc, char **argv)
set_mode(bsdar, opt);
break;
case 'D':
- bsdar->options |= AR_D;
+ Dflag = 1;
+ Uflag = 0;
break;
case 'f':
case 'T':
@@ -220,7 +225,8 @@ main(int argc, char **argv)
set_mode(bsdar, opt);
break;
case 'U':
- bsdar->options &= ~AR_D;
+ Uflag = 1;
+ Dflag = 0;
break;
case 'u':
bsdar->options |= AR_U;
@@ -273,6 +279,10 @@ main(int argc, char **argv)
argv++;
}
+ /* Set determinstic mode for -D, and by default without -U. */
+ if (Dflag || (Uflag == 0 && (bsdar->mode == 'q' || bsdar->mode == 'r')))
+ bsdar->options |= AR_D;
+
if (bsdar->options & AR_A)
only_mode(bsdar, "-a", "mqr");
if (bsdar->options & AR_B)
@@ -281,8 +291,10 @@ main(int argc, char **argv)
only_mode(bsdar, "-c", "qr");
if (bsdar->options & AR_CC)
only_mode(bsdar, "-C", "x");
- if (bsdar->options & AR_D)
+ if (Dflag)
only_mode(bsdar, "-D", "qr");
+ if (Uflag)
+ only_mode(bsdar, "-U", "qr");
if (bsdar->options & AR_O)
only_mode(bsdar, "-o", "x");
if (bsdar->options & AR_SS)
diff --git a/usr.bin/brandelf/brandelf.1 b/usr.bin/brandelf/brandelf.1
index 6b84777..309f467 100644
--- a/usr.bin/brandelf/brandelf.1
+++ b/usr.bin/brandelf/brandelf.1
@@ -9,7 +9,7 @@
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY John-Mark Gurney AND CONTRIBUTORS ``AS IS''
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
diff --git a/usr.bin/calendar/calendars/calendar.freebsd b/usr.bin/calendar/calendars/calendar.freebsd
index 41e8ea6..4d473c9 100644
--- a/usr.bin/calendar/calendars/calendar.freebsd
+++ b/usr.bin/calendar/calendars/calendar.freebsd
@@ -122,6 +122,7 @@
04/03 Hellmuth Michaelis <hm@FreeBSD.org> born in Kiel, Schleswig-Holstein, Germany, 1958
04/03 Tong Liu <nemoliu@FreeBSD.org> born in Beijing, People's Republic of China, 1981
04/03 Gabor Pali <pgj@FreeBSD.org> born in Kunhegyes, Hungary, 1982
+04/04 Jason Unovitch <junovitch@FreeBSD.org> born in Scranton, Pennsylvania, United States, 1986
04/05 Stacey Son <sson@FreeBSD.org> born in Burley, Idaho, United States, 1967
04/06 Peter Jeremy <peterj@FreeBSD.org> born in Sydney, New South Wales, Australia, 1961
04/07 Edward Tomasz Napierala <trasz@FreeBSD.org> born in Wolsztyn, Poland, 1981
diff --git a/usr.bin/elfcopy/Makefile b/usr.bin/elfcopy/Makefile
index 8e7f31d..dc6dd47 100644
--- a/usr.bin/elfcopy/Makefile
+++ b/usr.bin/elfcopy/Makefile
@@ -7,7 +7,15 @@ ELFCOPYDIR= ${ELFTCDIR}/elfcopy
.PATH: ${ELFCOPYDIR}
+.if ${MK_ELFCOPY_AS_OBJCOPY} != "no"
+PROG= objcopy
+objcopy.1: elfcopy.1
+ sed -e 's/\.Dt ELFCOPY 1/.Dt OBJCOPY 1/' \
+ -e 's/\.Nm elfcopy/.Nm objcopy/' < ${.ALLSRC} > ${.TARGET}
+CLEANFILES+= objcopy.1
+.else
PROG= elfcopy
+.endif
SRCS= archive.c ascii.c binary.c main.c sections.c segments.c symbols.c
@@ -17,8 +25,8 @@ LIBADD= archive elftc elf
CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
-MAN= elfcopy.1 strip.1
+MAN= ${PROG}.1 strip.1
-LINKS= ${BINDIR}/elfcopy ${BINDIR}/strip
+LINKS= ${BINDIR}/${PROG} ${BINDIR}/strip
.include <bsd.prog.mk>
diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h
index 3afe6e4..b2e344a 100644
--- a/usr.bin/find/extern.h
+++ b/usr.bin/find/extern.h
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
-void brace_subst(char *, char **, char *, int);
+void brace_subst(char *, char **, char *, size_t);
PLAN *find_create(char ***);
int find_execute(PLAN *, char **);
PLAN *find_formplan(char **);
diff --git a/usr.bin/find/misc.c b/usr.bin/find/misc.c
index 11a26be..df2e502 100644
--- a/usr.bin/find/misc.c
+++ b/usr.bin/find/misc.c
@@ -57,23 +57,33 @@ __FBSDID("$FreeBSD$");
* Replace occurrences of {} in s1 with s2 and return the result string.
*/
void
-brace_subst(char *orig, char **store, char *path, int len)
+brace_subst(char *orig, char **store, char *path, size_t len)
{
- int plen;
- char ch, *p;
+ const char *pastorigend, *p, *q;
+ char *dst;
+ size_t newlen, plen;
plen = strlen(path);
- for (p = *store; (ch = *orig) != '\0'; ++orig)
- if (ch == '{' && orig[1] == '}') {
- while ((p - *store) + plen > len)
- if (!(*store = realloc(*store, len *= 2)))
- err(1, NULL);
- memmove(p, path, plen);
- p += plen;
- ++orig;
- } else
- *p++ = ch;
- *p = '\0';
+ newlen = strlen(orig) + 1;
+ pastorigend = orig + newlen;
+ for (p = orig; (q = strstr(p, "{}")) != NULL; p = q + 2) {
+ if (plen > 2 && newlen + plen - 2 < newlen)
+ errx(2, "brace_subst overflow");
+ newlen += plen - 2;
+ }
+ if (newlen > len) {
+ *store = reallocf(*store, newlen);
+ if (*store == NULL)
+ err(2, NULL);
+ }
+ dst = *store;
+ for (p = orig; (q = strstr(p, "{}")) != NULL; p = q + 2) {
+ memcpy(dst, p, q - p);
+ dst += q - p;
+ memcpy(dst, path, plen);
+ dst += plen;
+ }
+ memcpy(dst, p, pastorigend - p);
}
/*
diff --git a/usr.bin/getopt/getopt.1 b/usr.bin/getopt/getopt.1
index d827137..781b6e0 100644
--- a/usr.bin/getopt/getopt.1
+++ b/usr.bin/getopt/getopt.1
@@ -1,6 +1,6 @@
.\" $FreeBSD$
.\"
-.Dd January 26, 2011
+.Dd August 1, 2015
.Dt GETOPT 1
.Os
.Sh NAME
@@ -62,7 +62,7 @@ set \-\- $args
# You cannot use the set command with a backquoted getopt directly,
# since the exit code from getopt would be shadowed by those of set,
# which is zero by definition.
-while true; do
+while :; do
case "$1" in
\-a|\-b)
echo "flag $1 set"; sflags="${1#-}$sflags"
@@ -83,10 +83,10 @@ echo "oarg is '$oarg'"
.Pp
This code will accept any of the following as equivalent:
.Bd -literal -offset indent
-cmd \-aoarg file file
-cmd \-a \-o arg file file
-cmd \-oarg -a file file
-cmd \-a \-oarg \-\- file file
+cmd \-aoarg file1 file2
+cmd \-a \-o arg file1 file2
+cmd \-oarg -a file1 file2
+cmd \-a \-oarg \-\- file1 file2
.Ed
.Sh SEE ALSO
.Xr getopts 1 ,
diff --git a/usr.bin/ipcrm/ipcrm.c b/usr.bin/ipcrm/ipcrm.c
index 32887e0..98c4555 100644
--- a/usr.bin/ipcrm/ipcrm.c
+++ b/usr.bin/ipcrm/ipcrm.c
@@ -34,6 +34,9 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#define _WANT_MSG_PROTOTYPES
+#define _WANT_SEM_PROTOTYPES
+#define _WANT_SHM_PROTOTYPES
#define _KERNEL
#include <sys/sem.h>
#include <sys/shm.h>
@@ -50,18 +53,11 @@ __FBSDID("$FreeBSD$");
#include "ipc.h"
-int signaled;
-int errflg;
-int rmverbose = 0;
+static int signaled;
+static int errflg;
+static int rmverbose = 0;
-void usage(void);
-
-int msgrm(key_t, int);
-int shmrm(key_t, int);
-int semrm(key_t, int);
-void not_configured(int);
-
-void
+static void
usage(void)
{
@@ -72,7 +68,7 @@ usage(void)
exit(1);
}
-int
+static int
msgrm(key_t key, int id)
{
@@ -113,7 +109,7 @@ msgrm(key_t key, int id)
return msgctl(id, IPC_RMID, NULL);
}
-int
+static int
shmrm(key_t key, int id)
{
@@ -154,7 +150,7 @@ shmrm(key_t key, int id)
return shmctl(id, IPC_RMID, NULL);
}
-int
+static int
semrm(key_t key, int id)
{
union semun arg;
@@ -173,7 +169,7 @@ semrm(key_t key, int id)
if ((kxsema[num].u.sem_perm.mode & SEM_ALLOC) != 0) {
id = IXSEQ_TO_IPCID(num,
kxsema[num].u.sem_perm);
- if (semctl(id, IPC_RMID, NULL) < 0) {
+ if (semctl(id, 0, IPC_RMID, NULL) < 0) {
if (rmverbose > 1)
warn("semid(%d): ", id);
errflg++;
@@ -196,7 +192,7 @@ semrm(key_t key, int id)
return semctl(id, 0, IPC_RMID, arg);
}
-void
+static void
not_configured(int signo __unused)
{
diff --git a/usr.bin/mkimg/image.c b/usr.bin/mkimg/image.c
index be1c2e9..a3bec63 100644
--- a/usr.bin/mkimg/image.c
+++ b/usr.bin/mkimg/image.c
@@ -517,14 +517,14 @@ image_copyout_memory(int fd, size_t size, void *ptr)
return (0);
}
-static int
-image_copyout_zeroes(int fd, size_t size)
+int
+image_copyout_zeroes(int fd, size_t count)
{
static uint8_t *zeroes = NULL;
size_t sz;
int error;
- if (lseek(fd, (off_t)size, SEEK_CUR) != -1)
+ if (lseek(fd, (off_t)count, SEEK_CUR) != -1)
return (0);
/*
@@ -537,12 +537,12 @@ image_copyout_zeroes(int fd, size_t size)
return (ENOMEM);
}
- while (size > 0) {
- sz = (size > secsz) ? secsz : size;
+ while (count > 0) {
+ sz = (count > secsz) ? secsz : count;
error = image_copyout_memory(fd, sz, zeroes);
if (error)
return (error);
- size -= sz;
+ count -= sz;
}
return (0);
}
diff --git a/usr.bin/mkimg/image.h b/usr.bin/mkimg/image.h
index ce195d9..0405c5b 100644
--- a/usr.bin/mkimg/image.h
+++ b/usr.bin/mkimg/image.h
@@ -35,6 +35,7 @@ int image_copyin(lba_t blk, int fd, uint64_t *sizep);
int image_copyout(int fd);
int image_copyout_done(int fd);
int image_copyout_region(int fd, lba_t blk, lba_t size);
+int image_copyout_zeroes(int fd, size_t count);
int image_data(lba_t blk, lba_t size);
lba_t image_get_size(void);
int image_init(void);
diff --git a/usr.bin/mkimg/mkimg.1 b/usr.bin/mkimg/mkimg.1
index 3b1d63e..b982791 100644
--- a/usr.bin/mkimg/mkimg.1
+++ b/usr.bin/mkimg/mkimg.1
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 22, 2015
+.Dd August 7, 2015
.Dt MKIMG 1
.Os
.Sh NAME
@@ -141,7 +141,7 @@ utility will create images that are identical.
.Pp
A set of long options exist to query about the
.Nm
-utilty itself.
+utility itself.
Options in this set should be given by themselves because the
.Nm
utility exits immediately after providing the requested information.
@@ -165,6 +165,85 @@ run the
.Nm
utility without any arguments.
This will print a usage message with all the necessary details.
+.Sh DISK FORMATS
+The
+.Nm
+utility supports a number of output file formats.
+A short description of these is given below.
+.Ss QCOW and QCOW2
+QCOW stands for "QEMU Copy On Write".
+It's a sparse file format akin to VHD and VMDK and QCOW represents the
+first version.
+QCOW2 represents version 2 of the file format.
+Version 2 is not backward compatible with version 1 and adds support for
+snapshots among other things.
+The QCOW file formats are natively supported by QEMU and Xen.
+To write QCOW, specify
+.Fl f Ar qcow
+on the command line.
+To write version 2 QCOW, specify
+.Fl f Ar qcow2
+on the command line.
+The preferred file extension is ".qcow" and ".qcow2" for QCOW and QCOW2
+(resp.), but ".qcow" is sometimes used for version 2 files as well.
+.Ss RAW file format
+This file format is a sector by sector representation of an actual disk.
+There is no extra information that describes or relates to the format
+itself. The size of the file is the size of the (virtual) disk.
+This file format is suitable for being copyied onto a disk with utilities
+like
+.Nm dd .
+To write a raw disk file, either omit the
+.Fl f
+option, or specify
+.Fl f Ar raw
+on the command line.
+The preferred file extension is one of ".img" or ".raw", but there's no
+real convention for it.
+.Ss Dynamic VHD and Fixed VHD
+Microsoft's "Virtual Hard Disk" file formats.
+The dynamic format is a sparse format akin to QCOW and VMDK.
+The fixed format is effectively a raw format with a footer appended to the
+file and as such it's often indistinguishable from the raw format.
+The fixed file format has been added to support Microsoft's Azure platform
+and due to inconsistencies in interpretation of the footer is not compatible
+with utilities like
+.Nm qemu
+when it is specifically instructed to interpreted the file as a VHD file.
+By default
+.Nm qemu
+will treat the file as a raw disk file, which mostly works fine.
+To have
+.Nm
+create a dynamic VHD file, specify
+.Fl f Ar vhd
+on the command line.
+To create a fixed VHD file for use by Azure, specify
+.Fl f Ar vhdf
+on the command line.
+The preferred file extension is ".vhd".
+.Ss VMDK
+VMware's "Virtual Machine Disk" file format.
+It's a sparse file format akin to QCOW and VHD and supported by many
+virtualization solutions.
+To create a VMDK file, specify
+.Fl f Ar vmdk
+on the command line.
+The preferred file extension is ".vmdk".
+.Pp
+Not all virtualization solutions support all file formats, but often those
+virtualization environments have utilities to convert from one format to
+another.
+Note however that conversion may require that the virtual disk size is
+changed to match the constraints of the output format and this may invalidate
+the contents of the disk image.
+For example, the GUID Partition Table (GPT) scheme has a header in the last
+sector on the disk.
+When changing the disk size, the GPT must be changed so that the last header
+is moved accordingly.
+This is typically not part of the conversion process.
+If possible, use an output format specifically for the environment in which
+the file is intended to be used.
.Sh ENVIRONMENT
.Bl -tag -width "TMPDIR" -compact
.It Ev TMPDIR
@@ -235,6 +314,7 @@ utility supports assigning labels to the partitions specified.
In the following example the file system partition is labeled as 'backup':
.Dl % mkimg -s gpt -p freebsd-ufs/backup:=file-system.ufs -o gpt.img
.Sh SEE ALSO
+.Xr dd 1 ,
.Xr gpart 8 ,
.Xr makefs 8 ,
.Xr mdconfig 8 ,
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.gz.uu
index 9b2f122..a2be9b1 100644
--- a/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.gz.uu
+++ b/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.gz.uu
@@ -1,18 +1,19 @@
# $FreeBSD$
begin 644 img-1x1-4096-apm.vhd.gz
-M'XL("'`EAE4``VEM9RTQ>#$M-#`Y-BUA<&TN=FAD+F]U=`"M5EUOVR`4?<^O
-MN-+>*LV":\#=XZ:U;Y.J5=,>6]?!E=6UC9I(ZT-^_+A\Q-C&;I+A$`3"]_AP
-M[@<PYAX`58)J06E0DL:5`/4%JDL`L^@;VI[[*>R;UQ?=[+KWPC_[E0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%"@%U#,`6C2-:Q[Z6YAMWQ[M<NOS7;FKMVD@4G1M0K-
+MV1XS4/22`M#P2W3%8]AYS.SB>CW=O*P]#AT.'2@OV"I#T.7@/8I^G3?JF/2P
+MP><:>?FT5Y<-U;56]"TJ$`JD[#R1>76$F7V'SBJR6JWJ5H"P=7Q\"VZ"B=;9
+M7NQRT;/JR!P+JFB='</I0U:_P4TG;BV:5*'$**@7H"44R&-*&Q^'0:-4V7Z^
+MFX]/V].'D531>WUR,)?%W467*N@?=@H4I_,A=Z&F?/5Q(ZGRK^CIT$ZY`05!
+MY'X":_?#Z+4HZ.K34AR(>7PQHOH,ZU.:5Y1W@9P+(Z=B59!1_%05<_CFP]K+
+M^RMU&\;/1%;WS_$S\\#N2'5012]XUXBFBUFT5HO_%YLQJ=QM<.6I."IR44%E
+MP=H>[K&#6R9>C'+@KN5,1EDGRS'@F>JY6[*[C7%_A64,QQMI"PIQK;O8,<$`
+M-]A<6!WLRZR+JUI<3^.1Z(7Z/,XF395R=2JN,E!:0!S;1L\];LE6]$<DS$@?
+MG]C=S<)/DRKH]I5D&Q6F5J@<,)E"`MK$"J4XF!F_K5_M%"8Z]3$NX:F/<0E/
+@?8Q+>.IC7,)3'^,2GOH8E_34I^O<F_P`@FX48"H,````
`
end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.gz.uu
index 883c81f..01a176d 100644
--- a/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.gz.uu
+++ b/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.gz.uu
@@ -1,18 +1,18 @@
# $FreeBSD$
begin 644 img-63x255-4096-apm.vhd.gz
-M'XL("*@EAE4``VEM9RTV,W@R-34M-#`Y-BUA<&TN=FAD+F]U=`"M5LMNW"`4
-MW<]77*F[2!W!->!T535JLJL4-:JZ3%P/CJPTR2@S4K/PQY?+(\8/7&?*#,(@
-M?(\/YSZ`,?<#4`6H!I0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DH!]<[;'%X"3<*]JM]B#MYN,)N-S]59RL_[_R^
+MASO:_XB3>^JX)K1K`YO.JL3)8JJ%G1]GR%O("R[&=@Q#X!1?F/7=QC(P<'='
+M'\3N&L:5X?S<P^$%=R'$U5-E60GAA=4[QNJ:Q,&HESOCBSN7(>'.M3A,6PC,
+M4%DH`VE6W&X/]#^S\+)`=)^B9-\V=,4TF4+I@,D4$K!-K-"D_7YH98.2Z*#`
+HN(0'!<8E/"@P+N%!@7$)#PJ,2WA08%S2@P(!*?<._P`B"8'870X`````
`
end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.gz.uu
index f47328c..0e9500f 100644
--- a/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.gz.uu
+++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.gz.uu
@@ -1,22 +1,22 @@
# $FreeBSD$
begin 644 img-63x255-4096-gpt.vhd.gz
-M'XL("+0EAE4``VEM9RTV,W@R-34M-#`Y-BUG<'0N=FAD+F]U=`"M6$UOU#`0
-MO?=7#.)61!H[\21[`8%4)&X%@7KAT"3K5"O$\K$]])`?C\=Q/IS8@6UGUTJS
-M<N;ES9OQ>.HT[3\`F`&V@!I0T7V1`^Z@*`',I!O27H7["5WS\ZB;A\-CXC[=
-M10\FTKF5;T[V,H/<O*0`6=%+<$_WT`TPR<OK^\O#C_L!3CHXZ8!405:9!*Q7
-M[\%T9$=(MP?YW4+>3>RR-;O)JO_3MI"ULR>R@=V=O;Z=.YL;*_,\#80&(<VG
-MX?WP)B9G%]JI=&$UHQD2=>9L"`ZWK,Z!N[QPL>A3Q21&8:Y&.@&%I'N3-H,.
-MJV%2Y?'TJ_IST@M^,I(J./(3J[DL[JYTJ2*'AQV#G-)YRUVP*`]+N$"J/$L]
-M].V&Z!H14C5,2.N^K]X$!7-^*-(-S>/!B/*KB%]NUED5N,8GNO>)_QT!Z_H\
-MP$%!'VY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G2#,,*$&\W'@^T50&4Y1,>AGI=CP>3P84?U*TD]C)90KU_C$^5T2?J_`
+MJKH-.'@PQ%T#4M7D/U>I;3M:U">)%ZXEI&T\(/M)?*N&.;Y5=QO0&"C+!?#+
+MH%_MPF%`6]`%)08V!RW!*##ZBG.VFWJJW_W[#_#P]M-G@CV.YM:NV+#5E5!;
+MZGFA=LM*&\V]K!1;3<6&`9EY>\"E4=Q^M79K*K:JW<"MC3A.;TE=UY)_B&V/
+M,R*4RJ=2J'.50E="V41P^QF.NR^W-%UA5&M:PHV$VJWEC04I`7(LD]Q!%"A4
+M$1=V7(4K`IZ/'Y-C#WN=_'KE]6NESXBU$9^(>:]U?3F/F9N-#3MB+H0X[K[<
+MYN0]P^:]PB?+VHA/1+U7]MY;=Q)Y;ZUTKZM:DKP(<16O]Z1;-;`^L'\OK_&)
+M\T,2?GN@\LL0V[JF?"-ETU![()N&VM<OHX:RW0SFK5&V7D,VDRW^26#5,&MR
+MSAY(.,8>2#C&'D@XUAY(0,8>2#C&'D@XQAY(.-8>F#6%2V:FK1KA*/=D`5)#
+ME]&&+5`CNND:]=M/S2WZO]"Q#=[&5FTU&(5@W*H1;G.K5G6W&LNX52,<ZU8M
+L]WV/Z;2%<(RG+81C/&TA'.-I"^$83UL(QWC:0CCN5,&MR^XO,$6$MJ(3````
`
end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu
index e6996d1..b8584d7 100644
--- a/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu
+++ b/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu
@@ -1,18 +1,19 @@
# $FreeBSD$
begin 644 img-63x255-4096-mbr.vhd.gz
-M'XL("+DEAE4``VEM9RTV,W@R-34M-#`Y-BUM8G(N=FAD+F]U=`"METUOXR`0
-MAN_Y%2/UEH.%QX#I)9$J];Z7W9[!M:NHVFW5[*$'__AE##C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X^^ENBI5-UNY]W0=5%WP1!6J*XI3B./6RCY/IP`C!_^,9W03382X2)U@
+M"ZM`YII3V;S8-9S<L[H&=W/PL7"I8A.CMB,#64*-=&W39O1#<MI4^?QXT^\?
+M[4(?;J2*G/25R9S:7B[Z5,$IL$X!I]3>6RX,E-<E;B55_LM[,K;C_L(Z@8EQ
+M`H?EQ]Z;41#JDR7;\?EV,#;U:=+';9WIE7%[HK\KXF,"&G,=4#%7'3%N6K!I
+M?'4PT()&JM+2UZKW7V/OVY6`G%S9'@/_F:?,\37==4`A0.L$^&O4U^S*N%Z?
+M4IGCJX:$L?W8MG,A0>%7%3[>/ZS4K](;[>![W4]IO(0;!8?=/L:=`ESERFVF
+M!,TIRKOP.L`=W7_$\3UUU!/:M8G-Q8K,R:+5PBZ,,Y0ME!4U8S9UK0`XQ1=F
+M?;>I#(R6NZ,/TN5JPM7Q\V6`PPO+A1AGILZR$L(+WCNFZIK,P3#+ROABY1(D
+MKER'P[R-0`^=Q6:@?2H=MR?ZGT5\."#Z3U&V;QOZ9II-(??`;`HML,VL4.?]
+M?DCA@I)IHT"XC!L%PF7<*!`NXT:!<!DW"H3+N%$@7-:-@@7:W#O\`W7?LJE=
+##@``
`
end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu
index 6257a74..662d2c3 100644
--- a/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu
+++ b/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu
@@ -1,18 +1,18 @@
# $FreeBSD$
begin 644 img-63x255-4096-pc98.vhd.gz
-M'XL("+\EAE4``VEM9RTV,W@R-34M-#`Y-BUP8SDX+G9H9"YO=70`K9=-CYLP
-M$(;O^14C];8'9,8?.)>-5&GOO;1[-A164=5VM>EA#_SX>K`=;`QDTSH09&3/
-MPSL?MF7&W`]`<5`#J!Z4I'8C0!VAT0"VT]\X/6O_"F/W^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:W,W!Y<*6BBF,RCP9*`X54MN4C8]#<IM2^7S_H_^^
+M=PM]N%$J:M+'D[YZVUUTI8)38JT"0:6]YRZ,E+<E;J54_BMZ*K83KF&"P*3O
+MP-'].'HS"D)]BK.=F&\G8U.?)GW"S#.]\MSN&.Z*^)J`37\=4$K0*?"7=[@E
+M?4<!K5B+NYNR2<7,#I_B_+8;U??M_':9XX=Z5\CU"NLZL\)Z5&A69+.@2P4U
+M?E7AP_WOE1E<ZVPIL3B\A/."P_4^QIT"7&DGW$P)B@U:#F7G7L)V@+NU?X\3
+M>^IH5>C6.C:=E9F+1=<+NS#/P#O@)2W';%JW`N"47YCU'5,9&+F[HP]2=S7A
+MJG@\#W!XP5V(<8W;>?W(*(47HG>;JFLS)Z-9SHPOSER"Q#/7XC#O0J#'E<54
+M(*WBR7.[8_A9Q)<%HMN,LNUNZ':/;`J%`V93*-S^D5&A;G>+[=HJ5-(F)=-1
+I@7`9CPJ$RWA4(%S&HP+A,AX5")?QJ$"XK$<%`S2U=_@'6B6GGU\.````
`
end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.gz.uu
index 995a75a..4b1226c 100644
--- a/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.gz.uu
+++ b/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.gz.uu
@@ -1,18 +1,18 @@
# $FreeBSD$
begin 644 img-63x255-4096-vtoc8.vhd.gz
-M'XL(",,EAE4``VEM9RTV,W@R-34M-#`Y-BUV=&]C."YV:&0N;W5T`*V636_;
-M,`R&[_D5!';KP9`I6;9/!?;1VX`!.^PZV9:+8-A:M#WTD!\_TI83R5]K5B:"
-M8T/BXY<4Q5"I\0-@-=@>K`=;\'UIP-905@`T&08.USP\PJE]^./;E^-K%CZG
-MPPC+56R5FK,]:C#TDA+0\4MLQ_=PFC#9AR_W-\??]Q,.`PX#J"C92B/89O:>
-M'"I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7FO@)3FE,F5Q3#A_#[V*W>]`3<)C+70=7
+MC-G)QM><+3K7HNWL6K=L`KM;4VV']M`^/]T&.&I4U&HMXO'L'JO=)#N9.;;Z
+MR-B&HD$/V(\M!'XZ=^YI&PY%PM,)*4$@2'.0"<"M(2YIS;R/`*]>M/YQ\_/T
+MS]5-JI\6>?EQ=H1^F.CGBB35+^TM?.X0_SR_1?WH,"DG<C/JMW]UB1CXY=8/
+MO7ZLFICG%[KK=?_O`-$WTVS=&6/WR\-0>,!L#$6LX5P,N5H,YD>CK'!C7<YT
+KU26XC%==@LMXU26XC%==@LMXU26XC%==@LMZU36`)IE7_P%G#2J)'PT`````
`
end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.gz.uu
index b965ffd..963b186 100644
--- a/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.gz.uu
+++ b/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.gz.uu
@@ -1,17 +1,17 @@
# $FreeBSD$
begin 644 img-63x255-512-bsd.vhd.gz
-M'XL("(XEAE4``VEM9RTV,W@R-34M-3$R+6)S9"YV:&0N;W5T`*V7.V^#,!#'
-M]WR*D[IU0.9L#%V:J%+W3NU,"$11U8>:#AWX\+T#$\Z\DK0&8AG9]^-_#UN.
-M4NT%8#78"FP)-N%^:L#>09H!T*![L&EC]PIU\?%>%M^'G\A=]:J%Q4I:^>9L
-MCQH,?20%S/DC=L=]J#M,=/.XOSV\[3L<.APZ4)*RE4:PV]%W,G52QZ27`[X.
-MU>FQNMZJ=;"J0%=BAI;JHF@M<8:L:#X_%K9)$Y_N\5Z\`8GSU"5J8"5D3@55
-M.#N%LTM6U^!N5RX7;:E08:34*K`QI,A]*ILN#J.'2N7G^)E_'<N!/IPI%2N2
-M,1PS\^ZB*Q7L)CL%A@4NN0L-Y3C$393*OZ)G?3OC.A0$E70#V+CO1Z]'@=1G
-M8[40\_EDS.K+69^A=99/M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>%!@7-*#`@$I]P[_`"()@=A=#@``
`
end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.gz.uu
index 438b398..b496241 100644
--- a/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.gz.uu
+++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.gz.uu
@@ -1,22 +1,23 @@
# $FreeBSD$
begin 644 img-63x255-512-gpt.vhd.gz
-M'XL(")8EAE4``VEM9RTV,W@R-34M-3$R+6=P="YV:&0N;W5T`*U82V^<,!"^
-M[Z^8JK=4I6#L@3U5K91*O:55JUYR"+`F6K7=/I)##OSX>L`&##;I)@.6EY69
-MCV^>'CE-APL`<\`64`,J>BXDX!Z*$L`LVB'Z.;-_H6M^G71S?WQ([-7M!K`L
-MG4OYXB0O<I#F(P6(BCZ"!WJ&SL$D+R]O+XX_;QV<L'#"`JF"I'(!6*^^@^G(
-MCI"^'<7W'O)F8I>OV4U2PT_;0M[.WL@=NYM^?CM75AHI\SX-A`8AE=/P_G@+
-MD[(+VZET(36C&3+J3-D0'&Y)G0-WL;.^&$+%!$9A9F.Z#`I!SR9LG!U6PX3*
-MP]WOZN^=7O`3D5#!D5^V6LOCZ@H;*L*];!E("N<M=:%'N5_"!4+E6=9#7\YY
-MUQ@A56Y!].K[UIN@8,X/LW3#YG%G1/E5Q$^:/*L"<WRA>Y_X]PA8U^<!.@OZ
-M<*/"=4/VZ^N`UI-&0Y!,ALTW')+.[%<?F/U;M^<!*@55M0+\ZO@UO3L42`2Y
-MI\`PQ4%FH`2H*9Q[W54SYW?YX2-<O?O\A<"N)W4;"A=]H`PR];,]+-BM,VU4
-M]QA*MD8,T2?:H+)Y%.Y-,'<;2C9#*@X7&G$XN24U[B7_X=L!3J6^5#F7*A64
-M9CMJX%!%X7YX<-QU6=-RC5`TM(6K#)I^+S\@9)GA9]*D[$$$".-WL[&;7;@F
-MP.[T*3D-8*^3/Z\L/Y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/N>UQDH56Q=RJD+A_*`-U%<5]"7#4?;G!:6VS:G`+ERD8MY?7"M+4ZK/+
+MI'`0#KP&9C=VNPMK!':G=\FIA[U(?CSW^IK45\36B$_$HM?PO8I`47]Q%T(<
+M=5]N"HR>)(M>Z8ME:\0GHM&K^NAM!PE%;2W=<5=+DB<A3M-&+W7'1[L^;/]>
+M7^,3W6T2OGL@]]L0V;[&?2,E4R@\D$RA\.N74&$J=I-Y:9:55TCFLO)E0Z8P
+MKPO*'H@XPAZ(.,(>B#C2'HA`PAZ(.,(>B#C"'H@XTAZ8UZ4K9J*C&N*P]KB"
+M4N._W<*$,J*'KNY9<M<+.\S=+?N_T+$#WLY1;3,9)2,\JB%N]ZBFVYBS(V?A
+M+.%1#7&D1[7"]SVBIRV((WS:@CC"IRV((WS:@CC"IRV((WS:@CCJ4K%'EZL_
+(<L>MI:(3````
`
end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu
index 16d286a..27e7455 100644
--- a/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu
+++ b/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu
@@ -1,18 +1,19 @@
# $FreeBSD$
begin 644 img-63x255-512-mbr.vhd.gz
-M'XL(")LEAE4``VEM9RTV,W@R-34M-3$R+6UB<BYV:&0N;W5T`*V736_C(!"&
-M[_D5(_66@X7'@.DED2KUOI?=GL&UJZC:;=7LH0?_^&4,.."O-%MB!V'!/'X'
-M9L:",?<#D!7(#F0+4E"_YB#OH58`=M#?.+2E?X2^>?O3-G]/GX7_]3L'*UEL
-ME9J3/5;`[4MJ0$TOD<_4ASY@BKO'E_WI]TO`H<>A!XF:K"H$:6;O46Q41Z2G
-M$[Y.U55S=1<KYV#70=5%,ZI875$<8QRW5G8^W1*,&-8GW,E#,A#C$G6"3:PB
-MF4N+&CF[A)-;5K?@]CN_%RY4;&#4MF4@2ZB1^C9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:JTM+7JO=?8^_;E8"<7-D>`_^9I\SQ-=UU0"%`ZP3X:]37[,JX7I]2
+MF>.KAH2Q_=BV<R%!X5<5/MX_K-2OTAOMX'O=3VF\A!L%A]T^QIT"7.7*;:8$
+MS2G*N_`ZP!W=?\3Q/774$]JUB<W%BLS)HM7"+HPSE"V4%35C-G6M`#C%%V9]
+MMZD,C):[HP_2Y6K"U?'S98##"\N%&&>FSK(2P@O>.Z;JFLS!,,O*^&+E$B2N
+M7(?#O(U`#YW%9J!]*AVW)_J?17PX(/I/4;9O&_IFFDTA]\!L"BVPS:Q0Y_U^
+M2.&"DFFC0+B,&P7"9=PH$"[C1H%P&3<*A,NX42!<UHV"!=K<._P#==^RJ5T.
+"````
`
end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu
index 8d76c35..eada46f 100644
--- a/usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu
+++ b/usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu
@@ -1,18 +1,18 @@
# $FreeBSD$
begin 644 img-63x255-512-pc98.vhd.gz
-M'XL("*$EAE4``VEM9RTV,W@R-34M-3$R+7!C.3@N=FAD+F]U=`"METV/FS`0
-MAN_Y%2/UM@=DQA\XEXU4:>^]M'LV%%91U7:UZ6$/_/AZL!UL#&33.A!D9,_#
-M.Q^V9<;<#T!Q4`.H'I2D=B-`':'1`+;3WS@]:_\*8_?[5]_].;]7_C<>'*QF
-ML55J3O;(0=B/-("&/J*^4QO&@*D^/;T\G'^^!!QZ''J0;,B*(Z@V^XYF5W5$
-M>C[CCZ4ZGJN;K9R#PP!\B$;P6%U5G6*<L%9V/-T*6CG%)]S)2](1XQ)UDBVL
-M(IEK08V<7<.I/:M[<`\'GPM7*K8P&OMDH&IHD-JV;$(<LMN6ROOEU;Q=^H4^
-MW"@5%25CV2>VW45?*A@&>P6"!.ZY"Q/ELL2ME,I_14^E=L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#;J,K-IHAS4P5]74E6J#"U0MF6EJ?IKUR8A??ZQ.GW/OXYH/(*D[E,P+0*
+MM0<F4ZCI$IE48=%6F'27RZ+L\S#1O9EQ">_-C$MX;V9<PGLSXQ+>FQF7\-[,
+2N*3W9@+2^=W]`WD,N"QL#0``
`
end
diff --git a/usr.bin/mkimg/vhd.c b/usr.bin/mkimg/vhd.c
index 054f82f..c4c1d1d 100644
--- a/usr.bin/mkimg/vhd.c
+++ b/usr.bin/mkimg/vhd.c
@@ -159,6 +159,34 @@ vhd_geometry(uint64_t image_size, struct vhd_geom *geom)
geom->cylinders = cth / geom->heads;
}
+static uint64_t
+vhd_resize(uint64_t origsz)
+{
+ struct vhd_geom geom;
+ uint64_t newsz;
+
+ /*
+ * Round the image size to the pre-determined geometry that
+ * matches the image size. This circular dependency implies
+ * that we need to loop to handle boundary conditions.
+ * The first time, newsz equals origsz and the geometry will
+ * typically yield a new size that's smaller. We keep adding
+ * cylinder's worth of sectors to the new size until its
+ * larger or equal or origsz. But during those iterations,
+ * the geometry can change, so we need to account for that.
+ */
+ newsz = origsz;
+ while (1) {
+ vhd_geometry(newsz, &geom);
+ newsz = (int64_t)geom.cylinders * geom.heads *
+ geom.sectors * VHD_SECTOR_SIZE;
+ if (newsz >= origsz)
+ break;
+ newsz += geom.heads * geom.sectors * VHD_SECTOR_SIZE;
+ }
+ return (newsz);
+}
+
static uint32_t
vhd_timestamp(void)
{
@@ -256,8 +284,7 @@ vhd_dyn_resize(lba_t imgsz)
{
uint64_t imagesz;
- imagesz = imgsz * secsz;
- imagesz = (imagesz + VHD_BLOCK_SIZE - 1) & ~(VHD_BLOCK_SIZE - 1);
+ imagesz = vhd_resize(imgsz * secsz);
return (image_set_size(imagesz / secsz));
}
@@ -266,7 +293,7 @@ vhd_dyn_write(int fd)
{
struct vhd_footer footer;
struct vhd_dyn_header header;
- uint64_t imgsz;
+ uint64_t imgsz, rawsz;
lba_t blk, blkcnt, nblks;
uint32_t *bat;
void *bitmap;
@@ -274,13 +301,14 @@ vhd_dyn_write(int fd)
uint32_t sector;
int bat_entries, error, entry;
- imgsz = image_get_size() * secsz;
- bat_entries = imgsz / VHD_BLOCK_SIZE;
+ rawsz = image_get_size() * secsz;
+ imgsz = (rawsz + VHD_BLOCK_SIZE - 1) & ~(VHD_BLOCK_SIZE - 1);
- vhd_make_footer(&footer, imgsz, VHD_DISK_TYPE_DYNAMIC, sizeof(footer));
+ vhd_make_footer(&footer, rawsz, VHD_DISK_TYPE_DYNAMIC, sizeof(footer));
if (sparse_write(fd, &footer, sizeof(footer)) < 0)
return (errno);
+ bat_entries = imgsz / VHD_BLOCK_SIZE;
memset(&header, 0, sizeof(header));
be64enc(&header.cookie, VHD_HEADER_COOKIE);
be64enc(&header.data_offset, ~0ULL);
@@ -321,7 +349,7 @@ vhd_dyn_write(int fd)
blk = 0;
blkcnt = VHD_BLOCK_SIZE / secsz;
error = 0;
- nblks = image_get_size();
+ nblks = rawsz / secsz;
while (blk < nblks) {
if (!image_data(blk, blkcnt)) {
blk += blkcnt;
@@ -331,15 +359,20 @@ vhd_dyn_write(int fd)
error = errno;
break;
}
+ /* Handle partial last block */
+ if (blk + blkcnt > nblks)
+ blkcnt = nblks - blk;
error = image_copyout_region(fd, blk, blkcnt);
if (error)
break;
blk += blkcnt;
}
free(bitmap);
- if (blk != nblks)
+ if (error)
+ return (error);
+ error = image_copyout_zeroes(fd, imgsz - rawsz);
+ if (error)
return (error);
-
if (sparse_write(fd, &footer, sizeof(footer)) < 0)
return (errno);
@@ -362,24 +395,9 @@ FORMAT_DEFINE(vhd_dyn_format);
static int
vhd_fix_resize(lba_t imgsz)
{
- struct vhd_geom geom;
- int64_t imagesz;
+ uint64_t imagesz;
- /*
- * Round the image size to the pre-determined geometry that
- * matches the image size. This circular dependency implies
- * that we need to loop to handle boundary conditions.
- */
- imgsz *= secsz;
- imagesz = imgsz;
- while (1) {
- vhd_geometry(imagesz, &geom);
- imagesz = (int64_t)geom.cylinders * geom.heads *
- geom.sectors * VHD_SECTOR_SIZE;
- if (imagesz >= imgsz)
- break;
- imagesz += geom.heads * geom.sectors * VHD_SECTOR_SIZE;
- }
+ imagesz = vhd_resize(imgsz * secsz);
/*
* Azure demands that images are a whole number of megabytes.
*/
@@ -391,24 +409,24 @@ static int
vhd_fix_write(int fd)
{
struct vhd_footer footer;
- uint64_t imgsz;
+ uint64_t imagesz;
int error;
error = image_copyout(fd);
- if (!error) {
- imgsz = image_get_size() * secsz;
- vhd_make_footer(&footer, imgsz, VHD_DISK_TYPE_FIXED, ~0ULL);
- if (sparse_write(fd, &footer, sizeof(footer)) < 0)
- error = errno;
- }
+ if (error)
+ return (error);
+
+ imagesz = image_get_size() * secsz;
+ vhd_make_footer(&footer, imagesz, VHD_DISK_TYPE_FIXED, ~0ULL);
+ error = (sparse_write(fd, &footer, sizeof(footer)) < 0) ? errno : 0;
return (error);
}
static struct mkimg_format vhd_fix_format = {
- .name = "vhdf",
- .description = "Fixed Virtual Hard Disk",
- .resize = vhd_fix_resize,
- .write = vhd_fix_write,
+ .name = "vhdf",
+ .description = "Fixed Virtual Hard Disk",
+ .resize = vhd_fix_resize,
+ .write = vhd_fix_write,
};
FORMAT_DEFINE(vhd_fix_format);
diff --git a/usr.bin/patch/common.h b/usr.bin/patch/common.h
index 8963c83..f33abcf 100644
--- a/usr.bin/patch/common.h
+++ b/usr.bin/patch/common.h
@@ -43,12 +43,10 @@
#define LINENUM_MAX LONG_MAX
#define SCCSPREFIX "s."
-#define GET "get -e %s"
-#define SCCSDIFF "get -p %s | diff - %s >/dev/null"
#define RCSSUFFIX ",v"
-#define CHECKOUT "co -l %s"
-#define RCSDIFF "rcsdiff %s > /dev/null"
+#define CHECKOUT "/usr/bin/co"
+#define RCSDIFF "/usr/bin/rcsdiff"
#define ORIGEXT ".orig"
#define REJEXT ".rej"
diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c
index 826f85b..e7fa351 100644
--- a/usr.bin/patch/inp.c
+++ b/usr.bin/patch/inp.c
@@ -31,8 +31,10 @@
#include <sys/file.h>
#include <sys/stat.h>
#include <sys/mman.h>
+#include <sys/wait.h>
#include <ctype.h>
+#include <errno.h>
#include <libgen.h>
#include <stddef.h>
#include <stdint.h>
@@ -133,12 +135,14 @@ reallocate_lines(size_t *lines_allocated)
static bool
plan_a(const char *filename)
{
- int ifd, statfailed;
+ int ifd, statfailed, devnull, pstat;
char *p, *s, lbuf[INITLINELEN];
struct stat filestat;
ptrdiff_t sz;
size_t i;
size_t iline, lines_allocated;
+ pid_t pid;
+ char *argp[4] = {NULL};
#ifdef DEBUGGING
if (debug & 8)
@@ -166,13 +170,14 @@ plan_a(const char *filename)
}
if (statfailed && check_only)
fatal("%s not found, -C mode, can't probe further\n", filename);
- /* For nonexistent or read-only files, look for RCS or SCCS versions. */
+ /* For nonexistent or read-only files, look for RCS versions. */
+
if (statfailed ||
/* No one can write to it. */
(filestat.st_mode & 0222) == 0 ||
/* I can't write to it. */
((filestat.st_mode & 0022) == 0 && filestat.st_uid != getuid())) {
- const char *cs = NULL, *filebase, *filedir;
+ char *filebase, *filedir;
struct stat cstat;
char *tmp_filename1, *tmp_filename2;
@@ -180,43 +185,26 @@ plan_a(const char *filename)
tmp_filename2 = strdup(filename);
if (tmp_filename1 == NULL || tmp_filename2 == NULL)
fatal("strdupping filename");
+
filebase = basename(tmp_filename1);
filedir = dirname(tmp_filename2);
- /* Leave room in lbuf for the diff command. */
- s = lbuf + 20;
-
#define try(f, a1, a2, a3) \
- (snprintf(s, buf_size - 20, f, a1, a2, a3), stat(s, &cstat) == 0)
-
- if (try("%s/RCS/%s%s", filedir, filebase, RCSSUFFIX) ||
- try("%s/RCS/%s%s", filedir, filebase, "") ||
- try("%s/%s%s", filedir, filebase, RCSSUFFIX)) {
- snprintf(buf, buf_size, CHECKOUT, filename);
- snprintf(lbuf, sizeof lbuf, RCSDIFF, filename);
- cs = "RCS";
- } else if (try("%s/SCCS/%s%s", filedir, SCCSPREFIX, filebase) ||
- try("%s/%s%s", filedir, SCCSPREFIX, filebase)) {
- snprintf(buf, buf_size, GET, s);
- snprintf(lbuf, sizeof lbuf, SCCSDIFF, s, filename);
- cs = "SCCS";
- } else if (statfailed)
- fatal("can't find %s\n", filename);
-
- free(tmp_filename1);
- free(tmp_filename2);
+ (snprintf(lbuf, sizeof(lbuf), f, a1, a2, a3), stat(lbuf, &cstat) == 0)
/*
* else we can't write to it but it's not under a version
* control system, so just proceed.
*/
- if (cs) {
+ if (try("%s/RCS/%s%s", filedir, filebase, RCSSUFFIX) ||
+ try("%s/RCS/%s%s", filedir, filebase, "") ||
+ try("%s/%s%s", filedir, filebase, RCSSUFFIX)) {
if (!statfailed) {
if ((filestat.st_mode & 0222) != 0)
/* The owner can write to it. */
fatal("file %s seems to be locked "
- "by somebody else under %s\n",
- filename, cs);
+ "by somebody else under RCS\n",
+ filename);
/*
* It might be checked out unlocked. See if
* it's safe to check out the default version
@@ -224,21 +212,59 @@ plan_a(const char *filename)
*/
if (verbose)
say("Comparing file %s to default "
- "%s version...\n",
- filename, cs);
- if (system(lbuf))
+ "RCS version...\n", filename);
+
+ switch (pid = fork()) {
+ case -1:
+ fatal("can't fork: %s\n",
+ strerror(errno));
+ case 0:
+ devnull = open("/dev/null", O_RDONLY);
+ if (devnull == -1) {
+ fatal("can't open /dev/null: %s",
+ strerror(errno));
+ }
+ (void)dup2(devnull, STDOUT_FILENO);
+ argp[0] = strdup(RCSDIFF);
+ argp[1] = strdup(filename);
+ execv(RCSDIFF, argp);
+ exit(127);
+ }
+ pid = waitpid(pid, &pstat, 0);
+ if (pid == -1 || WEXITSTATUS(pstat) != 0) {
fatal("can't check out file %s: "
- "differs from default %s version\n",
- filename, cs);
+ "differs from default RCS version\n",
+ filename);
+ }
}
+
if (verbose)
- say("Checking out file %s from %s...\n",
- filename, cs);
- if (system(buf) || stat(filename, &filestat))
- fatal("can't check out file %s from %s\n",
- filename, cs);
+ say("Checking out file %s from RCS...\n",
+ filename);
+
+ switch (pid = fork()) {
+ case -1:
+ fatal("can't fork: %s\n", strerror(errno));
+ case 0:
+ argp[0] = strdup(CHECKOUT);
+ argp[1] = strdup("-l");
+ argp[2] = strdup(filename);
+ execv(CHECKOUT, argp);
+ exit(127);
+ }
+ pid = waitpid(pid, &pstat, 0);
+ if (pid == -1 || WEXITSTATUS(pstat) != 0 ||
+ stat(filename, &filestat)) {
+ fatal("can't check out file %s from RCS\n",
+ filename);
+ }
+ } else if (statfailed) {
+ fatal("can't find %s\n", filename);
}
+ free(tmp_filename1);
+ free(tmp_filename2);
}
+
filemode = filestat.st_mode;
if (!S_ISREG(filemode))
fatal("%s is not a normal file--can't patch\n", filename);
diff --git a/usr.bin/patch/pathnames.h b/usr.bin/patch/pathnames.h
index d31300e..79d8fae 100644
--- a/usr.bin/patch/pathnames.h
+++ b/usr.bin/patch/pathnames.h
@@ -9,4 +9,4 @@
#include <paths.h>
-#define _PATH_ED "/bin/ed"
+#define _PATH_RED "/bin/red"
diff --git a/usr.bin/patch/pch.c b/usr.bin/patch/pch.c
index e731ca1..5fadf62 100644
--- a/usr.bin/patch/pch.c
+++ b/usr.bin/patch/pch.c
@@ -1,4 +1,3 @@
-
/*-
* Copyright 1986, Larry Wall
*
@@ -1410,13 +1409,14 @@ do_ed_script(void)
char *t;
off_t beginning_of_this_line;
FILE *pipefp = NULL;
+ int continuation;
if (!skip_rest_of_patch) {
if (copy_file(filearg[0], TMPOUTNAME) < 0) {
unlink(TMPOUTNAME);
fatal("can't create temp file %s", TMPOUTNAME);
}
- snprintf(buf, buf_size, "%s%s%s", _PATH_ED,
+ snprintf(buf, buf_size, "%s%s%s", _PATH_RED,
verbose ? " " : " -s ", TMPOUTNAME);
pipefp = popen(buf, "w");
}
@@ -1434,7 +1434,19 @@ do_ed_script(void)
(*t == 'a' || *t == 'c' || *t == 'd' || *t == 'i' || *t == 's')) {
if (pipefp != NULL)
fputs(buf, pipefp);
- if (*t != 'd') {
+ if (*t == 's') {
+ for (;;) {
+ continuation = 0;
+ t = strchr(buf, '\0') - 1;
+ while (--t >= buf && *t == '\\')
+ continuation = !continuation;
+ if (!continuation ||
+ pgets(true) == 0)
+ break;
+ if (pipefp != NULL)
+ fputs(buf, pipefp);
+ }
+ } else if (*t != 'd') {
while (pgets(true)) {
p_input_line++;
if (pipefp != NULL)
diff --git a/usr.bin/truss/syscall.h b/usr.bin/truss/syscall.h
index a573611..a2fa826 100644
--- a/usr.bin/truss/syscall.h
+++ b/usr.bin/truss/syscall.h
@@ -41,7 +41,7 @@ enum Argtype { None = 1, Hex, Octal, Int, LongHex, Name, Ptr, Stat, Ioctl, Quad,
Sigset, Sigprocmask, Kevent, Sockdomain, Socktype, Open,
Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2,
Pathconf, Rforkflags, ExitStatus, Waitoptions, Idtype, Procctl,
- LinuxSockArgs, Umtxop };
+ LinuxSockArgs, Umtxop, Atfd, Atflags, Timespec2, Accessmode };
#define ARG_MASK 0xff
#define OUT 0x100
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c
index efd27e9..7ecb38b 100644
--- a/usr.bin/truss/syscalls.c
+++ b/usr.bin/truss/syscalls.c
@@ -93,7 +93,7 @@ static const char rcsid[] =
*/
static struct syscall syscalls[] = {
{ .name = "fcntl", .ret_type = 1, .nargs = 3,
- .args = { { Int, 0 } , { Fcntl, 1 }, { Fcntlflag | OUT, 2 } } },
+ .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } },
{ .name = "fork", .ret_type = 1, .nargs = 0 },
{ .name = "vfork", .ret_type = 1, .nargs = 0 },
{ .name = "rfork", .ret_type = 1, .nargs = 1,
@@ -101,9 +101,9 @@ static struct syscall syscalls[] = {
{ .name = "getegid", .ret_type = 1, .nargs = 0 },
{ .name = "geteuid", .ret_type = 1, .nargs = 0 },
{ .name = "linux_readlink", .ret_type = 1, .nargs = 3,
- .args = { { Name, 0 } , { Name | OUT, 1 }, { Int, 2 }}},
+ .args = { { Name, 0 }, { Name | OUT, 1 }, { Int, 2 } } },
{ .name = "linux_socketcall", .ret_type = 1, .nargs = 2,
- .args = { { Int, 0 } , { LinuxSockArgs, 1 }}},
+ .args = { { Int, 0 }, { LinuxSockArgs, 1 } } },
{ .name = "getgid", .ret_type = 1, .nargs = 0 },
{ .name = "getpid", .ret_type = 1, .nargs = 0 },
{ .name = "getpgid", .ret_type = 1, .nargs = 1,
@@ -114,47 +114,84 @@ static struct syscall syscalls[] = {
.args = { { Int, 0 } } },
{ .name = "getuid", .ret_type = 1, .nargs = 0 },
{ .name = "readlink", .ret_type = 1, .nargs = 3,
- .args = { { Name, 0 } , { Readlinkres | OUT, 1 }, { Int, 2 } } },
+ .args = { { Name, 0 }, { Readlinkres | OUT, 1 }, { Int, 2 } } },
+ { .name = "readlinkat", .ret_type = 1, .nargs = 4,
+ .args = { { Atfd, 0 }, { Name, 1 }, { Readlinkres | OUT, 2 },
+ { Int, 3 } } },
{ .name = "lseek", .ret_type = 2, .nargs = 3,
- .args = { { Int, 0 }, { Quad, 1 + QUAD_ALIGN }, { Whence, 1 + QUAD_SLOTS + QUAD_ALIGN } } },
+ .args = { { Int, 0 }, { Quad, 1 + QUAD_ALIGN },
+ { Whence, 1 + QUAD_SLOTS + QUAD_ALIGN } } },
{ .name = "linux_lseek", .ret_type = 2, .nargs = 3,
.args = { { Int, 0 }, { Int, 1 }, { Whence, 2 } } },
{ .name = "mmap", .ret_type = 2, .nargs = 6,
- .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 }, { Mmapflags, 3 }, { Int, 4 }, { Quad, 5 + QUAD_ALIGN } } },
+ .args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 }, { Mmapflags, 3 },
+ { Int, 4 }, { Quad, 5 + QUAD_ALIGN } } },
{ .name = "linux_mkdir", .ret_type = 1, .nargs = 2,
- .args = { { Name | IN, 0} , {Int, 1}}},
+ .args = { { Name | IN, 0 }, { Int, 1 } } },
{ .name = "mprotect", .ret_type = 1, .nargs = 3,
.args = { { Ptr, 0 }, { Int, 1 }, { Mprot, 2 } } },
{ .name = "open", .ret_type = 1, .nargs = 3,
- .args = { { Name | IN, 0 } , { Open, 1 }, { Octal, 2 } } },
+ .args = { { Name | IN, 0 }, { Open, 1 }, { Octal, 2 } } },
+ { .name = "openat", .ret_type = 1, .nargs = 4,
+ .args = { { Atfd, 0 }, { Name | IN, 1 }, { Open, 2 },
+ { Octal, 3 } } },
{ .name = "mkdir", .ret_type = 1, .nargs = 2,
- .args = { { Name, 0 } , { Octal, 1 } } },
+ .args = { { Name, 0 }, { Octal, 1 } } },
+ { .name = "mkdirat", .ret_type = 1, .nargs = 3,
+ .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 } } },
{ .name = "linux_open", .ret_type = 1, .nargs = 3,
.args = { { Name, 0 }, { Hex, 1 }, { Octal, 2 } } },
{ .name = "close", .ret_type = 1, .nargs = 1,
.args = { { Int, 0 } } },
{ .name = "link", .ret_type = 0, .nargs = 2,
.args = { { Name, 0 }, { Name, 1 } } },
+ { .name = "linkat", .ret_type = 0, .nargs = 5,
+ .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 },
+ { Atflags, 4 } } },
{ .name = "unlink", .ret_type = 0, .nargs = 1,
.args = { { Name, 0 } } },
+ { .name = "unlinkat", .ret_type = 0, .nargs = 3,
+ .args = { { Atfd, 0 }, { Name, 1 }, { Atflags, 2 } } },
{ .name = "chdir", .ret_type = 0, .nargs = 1,
.args = { { Name, 0 } } },
{ .name = "chroot", .ret_type = 0, .nargs = 1,
.args = { { Name, 0 } } },
+ { .name = "mkfifo", .ret_type = 0, .nargs = 2,
+ .args = { { Name, 0 }, { Octal, 1 } } },
+ { .name = "mkfifoat", .ret_type = 0, .nargs = 3,
+ .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 } } },
{ .name = "mknod", .ret_type = 0, .nargs = 3,
- .args = { { Name, 0 }, { Octal, 1 }, { Int, 3 } } },
+ .args = { { Name, 0 }, { Octal, 1 }, { Int, 2 } } },
+ { .name = "mknodat", .ret_type = 0, .nargs = 4,
+ .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 }, { Int, 3 } } },
{ .name = "chmod", .ret_type = 0, .nargs = 2,
.args = { { Name, 0 }, { Octal, 1 } } },
+ { .name = "fchmod", .ret_type = 0, .nargs = 2,
+ .args = { { Int, 0 }, { Octal, 1 } } },
+ { .name = "lchmod", .ret_type = 0, .nargs = 2,
+ .args = { { Name, 0 }, { Octal, 1 } } },
+ { .name = "fchmodat", .ret_type = 0, .nargs = 4,
+ .args = { { Atfd, 0 }, { Name, 1 }, { Octal, 2 }, { Atflags, 3 } } },
{ .name = "chown", .ret_type = 0, .nargs = 3,
.args = { { Name, 0 }, { Int, 1 }, { Int, 2 } } },
+ { .name = "fchown", .ret_type = 0, .nargs = 3,
+ .args = { { Int, 0 }, { Int, 1 }, { Int, 2 } } },
+ { .name = "lchown", .ret_type = 0, .nargs = 3,
+ .args = { { Name, 0 }, { Int, 1 }, { Int, 2 } } },
+ { .name = "fchownat", .ret_type = 0, .nargs = 5,
+ .args = { { Atfd, 0 }, { Name, 1 }, { Int, 2 }, { Int, 3 },
+ { Atflags, 4 } } },
{ .name = "linux_stat64", .ret_type = 1, .nargs = 3,
- .args = { { Name | IN, 0 }, { Ptr | OUT, 1 }, { Ptr | IN, 1 }}},
+ .args = { { Name | IN, 0 }, { Ptr | OUT, 1 }, { Ptr | IN, 1 } } },
{ .name = "mount", .ret_type = 0, .nargs = 4,
.args = { { Name, 0 }, { Name, 1 }, { Int, 2 }, { Ptr, 3 } } },
{ .name = "umount", .ret_type = 0, .nargs = 2,
.args = { { Name, 0 }, { Int, 2 } } },
{ .name = "fstat", .ret_type = 1, .nargs = 2,
- .args = { { Int, 0 }, { Stat | OUT , 1 } } },
+ .args = { { Int, 0 }, { Stat | OUT, 1 } } },
+ { .name = "fstatat", .ret_type = 1, .nargs = 4,
+ .args = { { Atfd, 0 }, { Name | IN, 1 }, { Stat | OUT, 2 },
+ { Atflags, 3 } } },
{ .name = "stat", .ret_type = 1, .nargs = 2,
.args = { { Name | IN, 0 }, { Stat | OUT, 1 } } },
{ .name = "lstat", .ret_type = 1, .nargs = 2,
@@ -162,7 +199,7 @@ static struct syscall syscalls[] = {
{ .name = "linux_newstat", .ret_type = 1, .nargs = 2,
.args = { { Name | IN, 0 }, { Ptr | OUT, 1 } } },
{ .name = "linux_access", .ret_type = 1, .nargs = 2,
- .args = { { Name, 0 }, { Int, 1 }}},
+ .args = { { Name, 0 }, { Accessmode, 1 } } },
{ .name = "linux_newfstat", .ret_type = 1, .nargs = 2,
.args = { { Int, 0 }, { Ptr | OUT, 1 } } },
{ .name = "write", .ret_type = 1, .nargs = 3,
@@ -174,27 +211,43 @@ static struct syscall syscalls[] = {
{ .name = "exit", .ret_type = 0, .nargs = 1,
.args = { { Hex, 0 } } },
{ .name = "access", .ret_type = 1, .nargs = 2,
- .args = { { Name | IN, 0 }, { Int, 1 } } },
+ .args = { { Name | IN, 0 }, { Accessmode, 1 } } },
+ { .name = "eaccess", .ret_type = 1, .nargs = 2,
+ .args = { { Name | IN, 0 }, { Accessmode, 1 } } },
+ { .name = "faccessat", .ret_type = 1, .nargs = 4,
+ .args = { { Atfd, 0 }, { Name | IN, 1 }, { Accessmode, 2 },
+ { Atflags, 3 } } },
{ .name = "sigaction", .ret_type = 1, .nargs = 3,
- .args = { { Signal, 0 }, { Sigaction | IN, 1 }, { Sigaction | OUT, 2 } } },
+ .args = { { Signal, 0 }, { Sigaction | IN, 1 },
+ { Sigaction | OUT, 2 } } },
{ .name = "accept", .ret_type = 1, .nargs = 3,
.args = { { Int, 0 }, { Sockaddr | OUT, 1 }, { Ptr | OUT, 2 } } },
{ .name = "bind", .ret_type = 1, .nargs = 3,
.args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Int, 2 } } },
+ { .name = "bindat", .ret_type = 1, .nargs = 4,
+ .args = { { Atfd, 0 }, { Int, 1 }, { Sockaddr | IN, 2 },
+ { Int, 3 } } },
{ .name = "connect", .ret_type = 1, .nargs = 3,
.args = { { Int, 0 }, { Sockaddr | IN, 1 }, { Int, 2 } } },
+ { .name = "connectat", .ret_type = 1, .nargs = 4,
+ .args = { { Atfd, 0 }, { Int, 1 }, { Sockaddr | IN, 2 },
+ { Int, 3 } } },
{ .name = "getpeername", .ret_type = 1, .nargs = 3,
.args = { { Int, 0 }, { Sockaddr | OUT, 1 }, { Ptr | OUT, 2 } } },
{ .name = "getsockname", .ret_type = 1, .nargs = 3,
.args = { { Int, 0 }, { Sockaddr | OUT, 1 }, { Ptr | OUT, 2 } } },
{ .name = "recvfrom", .ret_type = 1, .nargs = 6,
- .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 }, { Hex, 3 }, { Sockaddr | OUT, 4 }, { Ptr | OUT, 5 } } },
+ .args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 }, { Hex, 3 },
+ { Sockaddr | OUT, 4 }, { Ptr | OUT, 5 } } },
{ .name = "sendto", .ret_type = 1, .nargs = 6,
- .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 }, { Hex, 3 }, { Sockaddr | IN, 4 }, { Ptr | IN, 5 } } },
+ .args = { { Int, 0 }, { BinString | IN, 1 }, { Int, 2 }, { Hex, 3 },
+ { Sockaddr | IN, 4 }, { Ptr | IN, 5 } } },
{ .name = "execve", .ret_type = 1, .nargs = 3,
- .args = { { Name | IN, 0 }, { StringArray | IN, 1 }, { StringArray | IN, 2 } } },
+ .args = { { Name | IN, 0 }, { StringArray | IN, 1 },
+ { StringArray | IN, 2 } } },
{ .name = "linux_execve", .ret_type = 1, .nargs = 3,
- .args = { { Name | IN, 0 }, { StringArray | IN, 1 }, { StringArray | IN, 2 } } },
+ .args = { { Name | IN, 0 }, { StringArray | IN, 1 },
+ { StringArray | IN, 2 } } },
{ .name = "kldload", .ret_type = 0, .nargs = 1,
.args = { { Name | IN, 0 } } },
{ .name = "kldunload", .ret_type = 0, .nargs = 1,
@@ -210,7 +263,8 @@ static struct syscall syscalls[] = {
{ .name = "nanosleep", .ret_type = 0, .nargs = 1,
.args = { { Timespec, 0 } } },
{ .name = "select", .ret_type = 1, .nargs = 5,
- .args = { { Int, 0 }, { Fd_set, 1 }, { Fd_set, 2 }, { Fd_set, 3 }, { Timeval, 4 } } },
+ .args = { { Int, 0 }, { Fd_set, 1 }, { Fd_set, 2 }, { Fd_set, 3 },
+ { Timeval, 4 } } },
{ .name = "poll", .ret_type = 1, .nargs = 3,
.args = { { Pollfd, 0 }, { Int, 1 }, { Int, 2 } } },
{ .name = "gettimeofday", .ret_type = 1, .nargs = 2,
@@ -220,11 +274,12 @@ static struct syscall syscalls[] = {
{ .name = "getitimer", .ret_type = 1, .nargs = 2,
.args = { { Int, 0 }, { Itimerval | OUT, 2 } } },
{ .name = "setitimer", .ret_type = 1, .nargs = 3,
- .args = { { Int, 0 }, { Itimerval, 1 } , { Itimerval | OUT, 2 } } },
+ .args = { { Int, 0 }, { Itimerval, 1 }, { Itimerval | OUT, 2 } } },
{ .name = "kse_release", .ret_type = 0, .nargs = 1,
.args = { { Timespec, 0 } } },
{ .name = "kevent", .ret_type = 0, .nargs = 6,
- .args = { { Int, 0 }, { Kevent, 1 }, { Int, 2 }, { Kevent | OUT, 3 }, { Int, 4 }, { Timespec, 5 } } },
+ .args = { { Int, 0 }, { Kevent, 1 }, { Int, 2 }, { Kevent | OUT, 3 },
+ { Int, 4 }, { Timespec, 5 } } },
{ .name = "sigprocmask", .ret_type = 0, .nargs = 3,
.args = { { Sigprocmask, 0 }, { Sigset, 1 }, { Sigset | OUT, 2 } } },
{ .name = "unmount", .ret_type = 1, .nargs = 2,
@@ -246,7 +301,14 @@ static struct syscall syscalls[] = {
{ .name = "lutimes", .ret_type = 1, .nargs = 2,
.args = { { Name | IN, 0 }, { Timeval2 | IN, 1 } } },
{ .name = "futimes", .ret_type = 1, .nargs = 2,
- .args = { { Int, 0 }, { Timeval | IN, 1 } } },
+ .args = { { Int, 0 }, { Timeval2 | IN, 1 } } },
+ { .name = "futimesat", .ret_type = 1, .nargs = 3,
+ .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timeval2 | IN, 2 } } },
+ { .name = "futimens", .ret_type = 1, .nargs = 2,
+ .args = { { Int, 0 }, { Timespec2 | IN, 1 } } },
+ { .name = "utimensat", .ret_type = 1, .nargs = 4,
+ .args = { { Atfd, 0 }, { Name | IN, 1 }, { Timespec2 | IN, 2 },
+ { Atflags, 3 } } },
{ .name = "chflags", .ret_type = 1, .nargs = 2,
.args = { { Name | IN, 0 }, { Hex, 1 } } },
{ .name = "lchflags", .ret_type = 1, .nargs = 2,
@@ -266,9 +328,13 @@ static struct syscall syscalls[] = {
{ .name = "read", .ret_type = 1, .nargs = 3,
.args = { { Int, 0 }, { BinString | OUT, 1 }, { Int, 2 } } },
{ .name = "rename", .ret_type = 1, .nargs = 2,
- .args = { { Name , 0 } , { Name, 1 } } },
+ .args = { { Name, 0 }, { Name, 1 } } },
+ { .name = "renameat", .ret_type = 1, .nargs = 4,
+ .args = { { Atfd, 0 }, { Name, 1 }, { Atfd, 2 }, { Name, 3 } } },
{ .name = "symlink", .ret_type = 1, .nargs = 2,
- .args = { { Name , 0 } , { Name, 1 } } },
+ .args = { { Name, 0 }, { Name, 1 } } },
+ { .name = "symlinkat", .ret_type = 1, .nargs = 3,
+ .args = { { Name, 0 }, { Atfd, 1 }, { Name, 2 } } },
{ .name = "posix_openpt", .ret_type = 1, .nargs = 1,
.args = { { Open, 0 } } },
{ .name = "wait4", .ret_type = 1, .nargs = 4,
@@ -297,12 +363,14 @@ struct xlat {
static struct xlat kevent_filters[] = {
X(EVFILT_READ) X(EVFILT_WRITE) X(EVFILT_AIO) X(EVFILT_VNODE)
X(EVFILT_PROC) X(EVFILT_SIGNAL) X(EVFILT_TIMER)
- X(EVFILT_FS) X(EVFILT_READ) XEND
+ X(EVFILT_PROCDESC) X(EVFILT_FS) X(EVFILT_LIO) X(EVFILT_USER)
+ X(EVFILT_SENDFILE) XEND
};
static struct xlat kevent_flags[] = {
X(EV_ADD) X(EV_DELETE) X(EV_ENABLE) X(EV_DISABLE) X(EV_ONESHOT)
- X(EV_CLEAR) X(EV_FLAG1) X(EV_ERROR) X(EV_EOF) XEND
+ X(EV_CLEAR) X(EV_RECEIPT) X(EV_DISPATCH) X(EV_FORCEONESHOT)
+ X(EV_DROP) X(EV_FLAG1) X(EV_ERROR) X(EV_EOF) XEND
};
static struct xlat poll_flags[] = {
@@ -315,7 +383,7 @@ static struct xlat mmap_flags[] = {
X(MAP_SHARED) X(MAP_PRIVATE) X(MAP_FIXED) X(MAP_RESERVED0020)
X(MAP_RESERVED0040) X(MAP_RESERVED0080) X(MAP_RESERVED0100)
X(MAP_HASSEMAPHORE) X(MAP_STACK) X(MAP_NOSYNC) X(MAP_ANON)
- X(MAP_NOCORE) X(MAP_PREFAULT_READ)
+ X(MAP_EXCL) X(MAP_NOCORE) X(MAP_PREFAULT_READ)
#ifdef MAP_32BIT
X(MAP_32BIT)
#endif
@@ -327,7 +395,7 @@ static struct xlat mprot_flags[] = {
};
static struct xlat whence_arg[] = {
- X(SEEK_SET) X(SEEK_CUR) X(SEEK_END) XEND
+ X(SEEK_SET) X(SEEK_CUR) X(SEEK_END) X(SEEK_DATA) X(SEEK_HOLE) XEND
};
static struct xlat sigaction_flags[] = {
@@ -337,7 +405,10 @@ static struct xlat sigaction_flags[] = {
static struct xlat fcntl_arg[] = {
X(F_DUPFD) X(F_GETFD) X(F_SETFD) X(F_GETFL) X(F_SETFL)
- X(F_GETOWN) X(F_SETOWN) X(F_GETLK) X(F_SETLK) X(F_SETLKW) XEND
+ X(F_GETOWN) X(F_SETOWN) X(F_OGETLK) X(F_OSETLK) X(F_OSETLKW)
+ X(F_DUP2FD) X(F_GETLK) X(F_SETLK) X(F_SETLKW) X(F_SETLK_REMOTE)
+ X(F_READAHEAD) X(F_RDAHEAD) X(F_DUPFD_CLOEXEC) X(F_DUP2FD_CLOEXEC)
+ XEND
};
static struct xlat fcntlfd_arg[] = {
@@ -346,7 +417,7 @@ static struct xlat fcntlfd_arg[] = {
static struct xlat fcntlfl_arg[] = {
X(O_APPEND) X(O_ASYNC) X(O_FSYNC) X(O_NONBLOCK) X(O_NOFOLLOW)
- X(O_DIRECT) XEND
+ X(FRDAHEAD) X(O_DIRECT) XEND
};
static struct xlat sockdomain_arg[] = {
@@ -357,7 +428,8 @@ static struct xlat sockdomain_arg[] = {
X(PF_LINK) X(PF_XTP) X(PF_COIP) X(PF_CNT) X(PF_SIP) X(PF_IPX)
X(PF_RTIP) X(PF_PIP) X(PF_ISDN) X(PF_KEY) X(PF_INET6)
X(PF_NATM) X(PF_ATM) X(PF_NETGRAPH) X(PF_SLOW) X(PF_SCLUSTER)
- X(PF_ARP) X(PF_BLUETOOTH) XEND
+ X(PF_ARP) X(PF_BLUETOOTH) X(PF_IEEE80211) X(PF_INET_SDP)
+ X(PF_INET6_SDP) XEND
};
static struct xlat socktype_arg[] = {
@@ -369,7 +441,8 @@ static struct xlat open_flags[] = {
X(O_RDONLY) X(O_WRONLY) X(O_RDWR) X(O_ACCMODE) X(O_NONBLOCK)
X(O_APPEND) X(O_SHLOCK) X(O_EXLOCK) X(O_ASYNC) X(O_FSYNC)
X(O_NOFOLLOW) X(O_CREAT) X(O_TRUNC) X(O_EXCL) X(O_NOCTTY)
- X(O_DIRECT) X(O_DIRECTORY) X(O_EXEC) X(O_TTY_INIT) X(O_CLOEXEC) XEND
+ X(O_DIRECT) X(O_DIRECTORY) X(O_EXEC) X(O_TTY_INIT) X(O_CLOEXEC)
+ X(O_VERIFY) XEND
};
static struct xlat shutdown_arg[] = {
@@ -379,7 +452,8 @@ static struct xlat shutdown_arg[] = {
static struct xlat resource_arg[] = {
X(RLIMIT_CPU) X(RLIMIT_FSIZE) X(RLIMIT_DATA) X(RLIMIT_STACK)
X(RLIMIT_CORE) X(RLIMIT_RSS) X(RLIMIT_MEMLOCK) X(RLIMIT_NPROC)
- X(RLIMIT_NOFILE) X(RLIMIT_SBSIZE) X(RLIMIT_VMEM) XEND
+ X(RLIMIT_NOFILE) X(RLIMIT_SBSIZE) X(RLIMIT_VMEM) X(RLIMIT_NPTS)
+ X(RLIMIT_SWAP) X(RLIMIT_KQUEUES) XEND
};
static struct xlat pathconf_arg[] = {
@@ -392,12 +466,12 @@ static struct xlat pathconf_arg[] = {
X(_PC_REC_MIN_XFER_SIZE) X(_PC_REC_XFER_ALIGN)
X(_PC_SYMLINK_MAX) X(_PC_ACL_EXTENDED) X(_PC_ACL_PATH_MAX)
X(_PC_CAP_PRESENT) X(_PC_INF_PRESENT) X(_PC_MAC_PRESENT)
- XEND
+ X(_PC_ACL_NFS4) X(_PC_MIN_HOLE_SIZE) XEND
};
static struct xlat rfork_flags[] = {
- X(RFPROC) X(RFNOWAIT) X(RFFDG) X(RFCFDG) X(RFTHREAD) X(RFMEM)
- X(RFSIGSHARE) X(RFTSIGZMB) X(RFLINUXTHPN) XEND
+ X(RFFDG) X(RFPROC) X(RFMEM) X(RFNOWAIT) X(RFCFDG) X(RFTHREAD)
+ X(RFSIGSHARE) X(RFLINUXTHPN) X(RFTSIGZMB) X(RFPPWAIT) XEND
};
static struct xlat wait_options[] = {
@@ -428,6 +502,15 @@ static struct xlat umtx_ops[] = {
XEND
};
+static struct xlat at_flags[] = {
+ X(AT_EACCESS) X(AT_SYMLINK_NOFOLLOW) X(AT_SYMLINK_FOLLOW)
+ X(AT_REMOVEDIR) XEND
+};
+
+static struct xlat access_modes[] = {
+ X(R_OK) X(W_OK) X(X_OK) XEND
+};
+
#undef X
#undef XEND
@@ -539,44 +622,56 @@ get_struct(pid_t pid, void *offset, void *buf, int len)
}
#define MAXSIZE 4096
-#define BLOCKSIZE 1024
+
/*
* get_string
* Copy a string from the process. Note that it is
* expected to be a C string, but if max is set, it will
* only get that much.
*/
-
static char *
-get_string(pid_t pid, void *offset, int max)
+get_string(pid_t pid, void *addr, int max)
{
struct ptrace_io_desc iorequest;
- char *buf;
- int diff, i, size, totalsize;
+ char *buf, *nbuf;
+ size_t offset, size, totalsize;
- diff = 0;
- totalsize = size = max ? (max + 1) : BLOCKSIZE;
+ offset = 0;
+ if (max)
+ size = max + 1;
+ else {
+ /* Read up to the end of the current page. */
+ size = PAGE_SIZE - ((uintptr_t)addr % PAGE_SIZE);
+ if (size > MAXSIZE)
+ size = MAXSIZE;
+ }
+ totalsize = size;
buf = malloc(totalsize);
if (buf == NULL)
return (NULL);
for (;;) {
- diff = totalsize - size;
iorequest.piod_op = PIOD_READ_D;
- iorequest.piod_offs = (char *)offset + diff;
- iorequest.piod_addr = buf + diff;
+ iorequest.piod_offs = (char *)addr + offset;
+ iorequest.piod_addr = buf + offset;
iorequest.piod_len = size;
if (ptrace(PT_IO, pid, (caddr_t)&iorequest, 0) < 0) {
free(buf);
return (NULL);
}
- for (i = 0 ; i < size; i++) {
- if (buf[diff + i] == '\0')
+ if (memchr(buf + offset, '\0', size) != NULL)
+ return (buf);
+ offset += size;
+ if (totalsize < MAXSIZE && max == 0) {
+ size = MAXSIZE - totalsize;
+ if (size > PAGE_SIZE)
+ size = PAGE_SIZE;
+ nbuf = realloc(buf, totalsize + size);
+ if (nbuf == NULL) {
+ buf[totalsize - 1] = '\0';
return (buf);
- }
- if (totalsize < MAXSIZE - BLOCKSIZE && max == 0) {
- totalsize += BLOCKSIZE;
- buf = realloc(buf, totalsize);
- size = BLOCKSIZE;
+ }
+ buf = nbuf;
+ totalsize += size;
} else {
buf[totalsize - 1] = '\0';
return (buf);
@@ -752,17 +847,51 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval,
struct timespec ts;
if (get_struct(pid, (void *)args[sc->offset], &ts,
sizeof(ts)) != -1)
- asprintf(&tmp, "{%ld.%09ld }", (long)ts.tv_sec,
+ asprintf(&tmp, "{ %ld.%09ld }", (long)ts.tv_sec,
ts.tv_nsec);
else
asprintf(&tmp, "0x%lx", args[sc->offset]);
break;
}
+ case Timespec2: {
+ struct timespec ts[2];
+ FILE *fp;
+ size_t len;
+ const char *sep;
+ unsigned int i;
+
+ if (get_struct(pid, (void *)args[sc->offset], &ts, sizeof(ts))
+ != -1) {
+ fp = open_memstream(&tmp, &len);
+ fputs("{ ", fp);
+ sep = "";
+ for (i = 0; i < nitems(ts); i++) {
+ fputs(sep, fp);
+ sep = ", ";
+ switch (ts[i].tv_nsec) {
+ case UTIME_NOW:
+ fprintf(fp, "UTIME_NOW");
+ break;
+ case UTIME_OMIT:
+ fprintf(fp, "UTIME_OMIT");
+ break;
+ default:
+ fprintf(fp, "%ld.%09ld",
+ (long)ts[i].tv_sec, ts[i].tv_nsec);
+ break;
+ }
+ }
+ fputs(" }", fp);
+ fclose(fp);
+ } else
+ asprintf(&tmp, "0x%lx", args[sc->offset]);
+ break;
+ }
case Timeval: {
struct timeval tv;
if (get_struct(pid, (void *)args[sc->offset], &tv, sizeof(tv))
!= -1)
- asprintf(&tmp, "{%ld.%06ld }", (long)tv.tv_sec,
+ asprintf(&tmp, "{ %ld.%06ld }", (long)tv.tv_sec,
tv.tv_usec);
else
asprintf(&tmp, "0x%lx", args[sc->offset]);
@@ -772,7 +901,7 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval,
struct timeval tv[2];
if (get_struct(pid, (void *)args[sc->offset], &tv, sizeof(tv))
!= -1)
- asprintf(&tmp, "{%ld.%06ld, %ld.%06ld }",
+ asprintf(&tmp, "{ %ld.%06ld, %ld.%06ld }",
(long)tv[0].tv_sec, tv[0].tv_usec,
(long)tv[1].tv_sec, tv[1].tv_usec);
else
@@ -783,7 +912,7 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval,
struct itimerval itv;
if (get_struct(pid, (void *)args[sc->offset], &itv,
sizeof(itv)) != -1)
- asprintf(&tmp, "{%ld.%06ld, %ld.%06ld }",
+ asprintf(&tmp, "{ %ld.%06ld, %ld.%06ld }",
(long)itv.it_interval.tv_sec,
itv.it_interval.tv_usec,
(long)itv.it_value.tv_sec,
@@ -859,7 +988,8 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval,
what = buf;
break;
}
- asprintf(&tmp, "(0x%lx)%s, 0x%lx", args[sc->offset], what, (long unsigned int)largs.args);
+ asprintf(&tmp, "(0x%lx)%s, 0x%lx", args[sc->offset], what,
+ (long unsigned int)largs.args);
break;
}
case Pollfd: {
@@ -886,6 +1016,7 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval,
tmpsize);
tmp[used++] = '{';
+ tmp[used++] = ' ';
for (i = 0; i < numfds; i++) {
u = snprintf(tmp + used, per_fd, "%s%d/%s",
@@ -894,6 +1025,7 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval,
if (u > 0)
used += u < per_fd ? u : per_fd;
}
+ tmp[used++] = ' ';
tmp[used++] = '}';
tmp[used++] = '\0';
} else {
@@ -926,6 +1058,7 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval,
"output", tmpsize);
tmp[used++] = '{';
+ tmp[used++] = ' ';
for (i = 0; i < numfds; i++) {
if (FD_ISSET(i, fds)) {
u = snprintf(tmp + used, per_fd, "%d ",
@@ -934,8 +1067,6 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval,
used += u < per_fd ? u : per_fd;
}
}
- if (tmp[used-1] == ' ')
- used--;
tmp[used++] = '}';
tmp[used++] = '\0';
} else
@@ -1136,8 +1267,9 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval,
default:
sa = (struct sockaddr *)&ss;
asprintf(&tmp, "{ sa_len = %d, sa_family = %d, sa_data "
- "= {%n%*s } }", (int)sa->sa_len, (int)sa->sa_family,
- &i, 6 * (int)(sa->sa_len - ((char *)&sa->sa_data -
+ "= { %n%*s } }", (int)sa->sa_len,
+ (int)sa->sa_family, &i,
+ 6 * (int)(sa->sa_len - ((char *)&sa->sa_data -
(char *)sa)), "");
if (tmp != NULL) {
p = tmp + i;
@@ -1203,6 +1335,7 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval,
"output", tmpsize);
tmp[used++] = '{';
+ tmp[used++] = ' ';
for (i = 0; i < numevents; i++) {
u = snprintf(tmp + used, per_ke,
"%s%p,%s,%s,%d,%p,%p",
@@ -1216,6 +1349,7 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval,
if (u > 0)
used += u < per_ke ? u : per_ke;
}
+ tmp[used++] = ' ';
tmp[used++] = '}';
tmp[used++] = '\0';
} else {
@@ -1297,6 +1431,22 @@ print_arg(struct syscall_args *sc, unsigned long *args, long retval,
case Umtxop:
tmp = strdup(xlookup(umtx_ops, args[sc->offset]));
break;
+ case Atfd:
+ if ((int)args[sc->offset] == AT_FDCWD)
+ tmp = strdup("AT_FDCWD");
+ else
+ asprintf(&tmp, "%d", (int)args[sc->offset]);
+ break;
+ case Atflags:
+ tmp = strdup(xlookup_bits(at_flags, args[sc->offset]));
+ break;
+ case Accessmode:
+ if (args[sc->offset] == F_OK)
+ tmp = strdup("F_OK");
+ else
+ tmp = strdup(xlookup_bits(access_modes,
+ args[sc->offset]));
+ break;
default:
errx(1, "Invalid argument type %d\n", sc->type & ARG_MASK);
}
diff --git a/usr.bin/vgrind/vgrindefs.c b/usr.bin/vgrind/vgrindefs.c
deleted file mode 100644
index 3c310a9..0000000
--- a/usr.bin/vgrind/vgrindefs.c
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- * Copyright (c) 1980, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-
-__FBSDID("$FreeBSD$");
-
-#define BUFSIZ 1024
-#define MAXHOP 32 /* max number of tc= indirections */
-
-#include <ctype.h>
-#include <fcntl.h>
-#include <string.h>
-#include <unistd.h>
-
-/*
- * grindcap - routines for dealing with the language definitions data base
- * (code stolen almost totally from termcap)
- *
- * BUG: Should use a "last" pointer in tbuf, so that searching
- * for capabilities alphabetically would not be a n**2/2
- * process when large numbers of capabilities are given.
- * Note: If we add a last pointer now we will screw up the
- * tc capability. We really should compile termcap.
- *
- * Essentially all the work here is scanning and decoding escapes
- * in string capabilities. We don't use stdio because the editor
- * doesn't, and because living w/o it is not hard.
- */
-
-static char *tbuf;
-static char *filename;
-static int hopcount; /* detect infinite loops in termcap, init 0 */
-
-static int tnchktc(void);
-static int tnamatch(char *);
-static char *tskip(register char *);
-static char *tdecode(register char *, char **);
-
-/*
- * Get an entry for terminal name in buffer bp,
- * from the termcap file. Parse is very rudimentary;
- * we just notice escaped newlines.
- */
-int
-tgetent(char *bp, char *name, char *file)
-{
- register char *cp;
- register int c;
- register int i = 0, cnt = 0;
- char ibuf[BUFSIZ];
- int tf;
-
- tbuf = bp;
- tf = 0;
- filename = file;
- tf = open(filename, O_RDONLY);
- if (tf < 0)
- return (-1);
- for (;;) {
- cp = bp;
- for (;;) {
- if (i == cnt) {
- cnt = read(tf, ibuf, BUFSIZ);
- if (cnt <= 0) {
- close(tf);
- return (0);
- }
- i = 0;
- }
- c = ibuf[i++];
- if (c == '\n') {
- if (cp > bp && cp[-1] == '\\'){
- cp--;
- continue;
- }
- break;
- }
- if (cp >= bp+BUFSIZ) {
- write(STDERR_FILENO, "Vgrind entry too long\n", 23);
- break;
- } else
- *cp++ = c;
- }
- *cp = 0;
-
- /*
- * The real work for the match.
- */
- if (tnamatch(name)) {
- close(tf);
- return(tnchktc());
- }
- }
-}
-
-/*
- * tnchktc: check the last entry, see if it's tc=xxx. If so,
- * recursively find xxx and append that entry (minus the names)
- * to take the place of the tc=xxx entry. This allows termcap
- * entries to say "like an HP2621 but doesn't turn on the labels".
- * Note that this works because of the left to right scan.
- */
-static int
-tnchktc(void)
-{
- register char *p, *q;
- char tcname[16]; /* name of similar terminal */
- char tcbuf[BUFSIZ];
- char *holdtbuf = tbuf;
- int l;
-
- p = tbuf + strlen(tbuf) - 2; /* before the last colon */
- while (*--p != ':')
- if (p<tbuf) {
- write(STDERR_FILENO, "Bad vgrind entry\n", 18);
- return (0);
- }
- p++;
- /* p now points to beginning of last field */
- if (p[0] != 't' || p[1] != 'c')
- return(1);
- strlcpy(tcname, p+3, 16);
- q = tcname;
- while (q && *q != ':')
- q++;
- *q = 0;
- if (++hopcount > MAXHOP) {
- write(STDERR_FILENO, "Infinite tc= loop\n", 18);
- return (0);
- }
- if (tgetent(tcbuf, tcname, filename) != 1)
- return(0);
- for (q=tcbuf; *q != ':'; q++)
- ;
- l = p - holdtbuf + strlen(q);
- if (l > BUFSIZ) {
- write(STDERR_FILENO, "Vgrind entry too long\n", 23);
- q[BUFSIZ - (p-tbuf)] = 0;
- }
- strlcpy(p, q+1, BUFSIZ - (p - holdtbuf));
- tbuf = holdtbuf;
- return(1);
-}
-
-/*
- * Tnamatch deals with name matching. The first field of the termcap
- * entry is a sequence of names separated by |'s, so we compare
- * against each such name. The normal : terminator after the last
- * name (before the first field) stops us.
- */
-static int
-tnamatch(char *np)
-{
- register char *Np, *Bp;
-
- Bp = tbuf;
- if (*Bp == '#')
- return(0);
- for (;;) {
- for (Np = np; *Np && *Bp == *Np; Bp++, Np++)
- continue;
- if (*Np == 0 && (*Bp == '|' || *Bp == ':' || *Bp == 0))
- return (1);
- while (*Bp && *Bp != ':' && *Bp != '|')
- Bp++;
- if (*Bp == 0 || *Bp == ':')
- return (0);
- Bp++;
- }
-}
-
-/*
- * Skip to the next field. Notice that this is very dumb, not
- * knowing about \: escapes or any such. If necessary, :'s can be put
- * into the termcap file in octal.
- */
-static char *
-tskip(register char *bp)
-{
-
- while (*bp && *bp != ':')
- bp++;
- if (*bp == ':')
- bp++;
- return (bp);
-}
-
-/*
- * Return the (numeric) option id.
- * Numeric options look like
- * li#80
- * i.e. the option string is separated from the numeric value by
- * a # character. If the option is not found we return -1.
- * Note that we handle octal numbers beginning with 0.
- */
-int
-tgetnum(char *id)
-{
- register int i, base;
- register char *bp = tbuf;
-
- for (;;) {
- bp = tskip(bp);
- if (*bp == 0)
- return (-1);
- if (*bp++ != id[0] || *bp == 0 || *bp++ != id[1])
- continue;
- if (*bp == '@')
- return(-1);
- if (*bp != '#')
- continue;
- bp++;
- base = 10;
- if (*bp == '0')
- base = 8;
- i = 0;
- while (isdigit(*bp))
- i *= base, i += *bp++ - '0';
- return (i);
- }
-}
-
-/*
- * Handle a flag option.
- * Flag options are given "naked", i.e. followed by a : or the end
- * of the buffer. Return 1 if we find the option, or 0 if it is
- * not given.
- */
-int
-tgetflag(char *id)
-{
- register char *bp = tbuf;
-
- for (;;) {
- bp = tskip(bp);
- if (!*bp)
- return (0);
- if (*bp++ == id[0] && *bp != 0 && *bp++ == id[1]) {
- if (!*bp || *bp == ':')
- return (1);
- else if (*bp == '@')
- return(0);
- }
- }
-}
-
-/*
- * Get a string valued option.
- * These are given as
- * cl=^Z
- * Much decoding is done on the strings, and the strings are
- * placed in area, which is a ref parameter which is updated.
- * No checking on area overflow.
- */
-char *
-tgetstr(char *id, char **area)
-{
- register char *bp = tbuf;
-
- for (;;) {
- bp = tskip(bp);
- if (!*bp)
- return (0);
- if (*bp++ != id[0] || *bp == 0 || *bp++ != id[1])
- continue;
- if (*bp == '@')
- return(0);
- if (*bp != '=')
- continue;
- bp++;
- return (tdecode(bp, area));
- }
-}
-
-/*
- * Tdecode does the grung work to decode the
- * string capability escapes.
- */
-static char *
-tdecode(register char *str, char **area)
-{
- register char *cp;
- register int c;
-
- cp = *area;
- while ((c = *str++)) {
- if (c == ':' && *(cp-1) != '\\')
- break;
- *cp++ = c;
- }
- *cp++ = 0;
- str = *area;
- *area = cp;
- return (str);
-}
diff --git a/usr.bin/wall/ttymsg.c b/usr.bin/wall/ttymsg.c
index 37b09e9..1317a4b 100644
--- a/usr.bin/wall/ttymsg.c
+++ b/usr.bin/wall/ttymsg.c
@@ -62,7 +62,7 @@ ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout)
struct iovec localiov[7];
ssize_t left, wret;
int cnt, fd;
- static char device[MAXNAMLEN] = _PATH_DEV;
+ char device[MAXNAMLEN] = _PATH_DEV;
static char errbuf[1024];
char *p;
int forked;
@@ -71,8 +71,8 @@ ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout)
if (iovcnt > (int)(sizeof(localiov) / sizeof(localiov[0])))
return ("too many iov's (change code in wall/ttymsg.c)");
+ strlcat(device, line, sizeof(device));
p = device + sizeof(_PATH_DEV) - 1;
- strlcpy(p, line, sizeof(device));
if (strncmp(p, "pts/", 4) == 0)
p += 4;
if (strchr(p, '/') != NULL) {
diff --git a/usr.bin/xargs/xargs.1 b/usr.bin/xargs/xargs.1
index 934d6ed..607b966 100644
--- a/usr.bin/xargs/xargs.1
+++ b/usr.bin/xargs/xargs.1
@@ -33,7 +33,7 @@
.\" $FreeBSD$
.\" $xMach: xargs.1,v 1.2 2002/02/23 05:23:37 tim Exp $
.\"
-.Dd March 16, 2012
+.Dd August 4, 2015
.Dt XARGS 1
.Os
.Sh NAME
@@ -207,6 +207,11 @@ Parallel mode: run at most
invocations of
.Ar utility
at once.
+If
+.Ar maxprocs
+is set to 0,
+.Nm
+will run as many processes as possible.
.It Fl p
Echo each command to be executed and ask the user whether it should be
executed.
diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c
index b95c7d4..c69a23a 100644
--- a/usr.bin/xargs/xargs.c
+++ b/usr.bin/xargs/xargs.c
@@ -46,9 +46,11 @@ static char sccsid[] = "@(#)xargs.c 8.1 (Berkeley) 6/6/93";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <sys/param.h>
+#include <sys/types.h>
#include <sys/wait.h>
-
+#include <sys/time.h>
+#include <sys/limits.h>
+#include <sys/resource.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
@@ -100,6 +102,7 @@ main(int argc, char *argv[])
long arg_max;
int ch, Jflag, nargs, nflag, nline;
size_t linelen;
+ struct rlimit rl;
char *endptr;
const char *errstr;
@@ -166,6 +169,14 @@ main(int argc, char *argv[])
maxprocs = strtonum(optarg, 1, INT_MAX, &errstr);
if (errstr)
errx(1, "-P %s: %s", optarg, errstr);
+ if (getrlimit(RLIMIT_NPROC, &rl) != 0)
+ errx(1, "getrlimit failed");
+ if (*endptr != '\0')
+ errx(1, "invalid number for -P option");
+ if (maxprocs < 0)
+ errx(1, "value for -P option should be >= 0");
+ if (maxprocs == 0 || maxprocs > rl.rlim_cur)
+ maxprocs = rl.rlim_cur;
break;
case 'p':
pflag = 1;
diff --git a/usr.bin/ypcat/ypcat.c b/usr.bin/ypcat/ypcat.c
index 3484bc9..aad07cc 100644
--- a/usr.bin/ypcat/ypcat.c
+++ b/usr.bin/ypcat/ypcat.c
@@ -1,5 +1,7 @@
+/* $OpenBSD: ypcat.c,v 1.16 2015/02/08 23:40:35 deraadt Exp $ */
+
/*
- * Copyright (c) 1992/3 Theo de Raadt <deraadt@fsa.ca>
+ * Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -10,9 +12,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -35,11 +34,6 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/socket.h>
-#include <rpc/rpc.h>
-#include <rpc/xdr.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-
#include <ctype.h>
#include <err.h>
#include <stdio.h>
@@ -47,7 +41,12 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
-struct ypalias {
+#include <rpc/rpc.h>
+#include <rpc/xdr.h>
+#include <rpcsvc/yp.h>
+#include <rpcsvc/ypclnt.h>
+
+static const struct ypalias {
char *alias, *name;
} ypaliases[] = {
{ "passwd", "passwd.byname" },
@@ -62,19 +61,20 @@ struct ypalias {
{ "ethers", "ethers.byname" },
};
-int key;
+static int key;
static void
usage(void)
{
fprintf(stderr, "%s\n%s\n",
- "usage: ypcat [-kt] [-d domainname] mapname",
- " ypcat -x");
+ "usage: ypcat [-kt] [-d domainname] mapname",
+ " ypcat -x");
exit(1);
}
static int
-printit(unsigned long instatus, char *inkey, int inkeylen, char *inval, int invallen, void *dummy __unused)
+printit(u_long instatus, char *inkey, int inkeylen, char *inval, int invallen,
+ void *indata)
{
if (instatus != YP_TRUE)
return (instatus);
@@ -87,31 +87,27 @@ printit(unsigned long instatus, char *inkey, int inkeylen, char *inval, int inva
int
main(int argc, char *argv[])
{
- char *domainname = NULL;
+ char *domain = NULL, *inmap;
struct ypall_callback ypcb;
- char *inmap;
- int notrans;
- int c, r;
+ int c, notrans, r;
u_int i;
notrans = key = 0;
-
while ((c = getopt(argc, argv, "xd:kt")) != -1)
switch (c) {
case 'x':
- for (i = 0; i<sizeof ypaliases/sizeof ypaliases[0]; i++)
+ for (i=0; i<sizeof ypaliases/sizeof ypaliases[0]; i++)
printf("Use \"%s\" for \"%s\"\n",
- ypaliases[i].alias,
- ypaliases[i].name);
+ ypaliases[i].alias, ypaliases[i].name);
exit(0);
case 'd':
- domainname = optarg;
+ domain = optarg;
break;
case 't':
- notrans++;
+ notrans = 1;
break;
case 'k':
- key++;
+ key = 1;
break;
default:
usage();
@@ -120,24 +116,27 @@ main(int argc, char *argv[])
if (optind + 1 != argc)
usage();
- if (!domainname)
- yp_get_default_domain(&domainname);
+ if (domain == NULL)
+ yp_get_default_domain(&domain);
inmap = argv[optind];
- for (i = 0; (!notrans) && i<sizeof ypaliases/sizeof ypaliases[0]; i++)
- if (strcmp(inmap, ypaliases[i].alias) == 0)
- inmap = ypaliases[i].name;
+ if (!notrans) {
+ for (i=0; i<sizeof ypaliases/sizeof ypaliases[0]; i++)
+ if (strcmp(inmap, ypaliases[i].alias) == 0)
+ inmap = ypaliases[i].name;
+ }
ypcb.foreach = printit;
ypcb.data = NULL;
- r = yp_all(domainname, inmap, &ypcb);
+ r = yp_all(domain, inmap, &ypcb);
switch (r) {
case 0:
break;
case YPERR_YPBIND:
errx(1, "not running ypbind");
default:
- errx(1, "no such map %s. reason: %s", inmap, yperr_string(r));
+ errx(1, "no such map %s. Reason: %s",
+ inmap, yperr_string(r));
}
exit(0);
}
diff --git a/usr.bin/ypmatch/ypmatch.c b/usr.bin/ypmatch/ypmatch.c
index a9c32ea..ff5365b 100644
--- a/usr.bin/ypmatch/ypmatch.c
+++ b/usr.bin/ypmatch/ypmatch.c
@@ -1,5 +1,8 @@
+/* $OpenBSD: ypmatch.c,v 1.16 2015/02/08 23:40:35 deraadt Exp $ */
+/* $NetBSD: ypmatch.c,v 1.8 1996/05/07 01:24:52 jtc Exp $ */
+
/*
- * Copyright (c) 1992/3 Theo de Raadt <deraadt@fsa.ca>
+ * Copyright (c) 1992, 1993, 1996 Theo de Raadt <deraadt@theos.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -10,9 +13,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -35,11 +35,6 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/socket.h>
-#include <rpc/rpc.h>
-#include <rpc/xdr.h>
-#include <rpcsvc/yp_prot.h>
-#include <rpcsvc/ypclnt.h>
-
#include <ctype.h>
#include <err.h>
#include <stdio.h>
@@ -47,7 +42,12 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
-struct ypalias {
+#include <rpc/rpc.h>
+#include <rpc/xdr.h>
+#include <rpcsvc/yp_prot.h>
+#include <rpcsvc/ypclnt.h>
+
+static const struct ypalias {
char *alias, *name;
} ypaliases[] = {
{ "passwd", "passwd.byname" },
@@ -66,26 +66,31 @@ static void
usage(void)
{
fprintf(stderr, "%s\n%s\n",
- "usage: ypmatch [-kt] [-d domainname] key ... mapname",
- " ypmatch -x");
+ "usage: ypmatch [-kt] [-d domainname] key ... mapname",
+ " ypmatch -x");
+ fprintf(stderr,
+ "where\n"
+ "\tmapname may be either a mapname or a nickname for a map.\n"
+ "\t-k prints keys as well as values.\n"
+ "\t-t inhibits map nickname translation.\n"
+ "\t-x dumps the map nickname translation table.\n");
exit(1);
}
int
main(int argc, char *argv[])
{
- char *domainname = NULL;
- char *inkey, *inmap, *outbuf;
- int outbuflen, key, notrans;
+ char *domainname, *inkey, *inmap, *outbuf;
+ int outbuflen, key, notrans, rval;
int c, r;
u_int i;
+ domainname = NULL;
notrans = key = 0;
-
- while ((c = getopt(argc, argv, "xd:kt")) != -1)
+ while ((c=getopt(argc, argv, "xd:kt")) != -1)
switch (c) {
case 'x':
- for (i = 0; i<sizeof ypaliases/sizeof ypaliases[0]; i++)
+ for (i=0; i<sizeof ypaliases/sizeof ypaliases[0]; i++)
printf("Use \"%s\" for \"%s\"\n",
ypaliases[i].alias,
ypaliases[i].name);
@@ -94,25 +99,30 @@ main(int argc, char *argv[])
domainname = optarg;
break;
case 't':
- notrans++;
+ notrans = 1;
break;
case 'k':
- key++;
+ key = 1;
break;
default:
usage();
}
- if ((argc-optind) < 2)
+ if ((argc-optind) < 2 )
usage();
- if (!domainname)
+ if (domainname == NULL) {
yp_get_default_domain(&domainname);
+ }
inmap = argv[argc-1];
- for (i = 0; (!notrans) && i<sizeof ypaliases/sizeof ypaliases[0]; i++)
- if (strcmp(inmap, ypaliases[i].alias) == 0)
- inmap = ypaliases[i].name;
+ if (notrans == 0) {
+ for (i=0; i<sizeof ypaliases/sizeof ypaliases[0]; i++)
+ if (strcmp(inmap, ypaliases[i].alias) == 0)
+ inmap = ypaliases[i].name;
+ }
+
+ rval = 0;
for (; optind < argc-1; optind++) {
inkey = argv[optind];
@@ -121,15 +131,17 @@ main(int argc, char *argv[])
switch (r) {
case 0:
if (key)
- printf("%s ", inkey);
+ printf("%s: ", inkey);
printf("%*.*s\n", outbuflen, outbuflen, outbuf);
break;
case YPERR_YPBIND:
errx(1, "not running ypbind");
default:
- errx(1, "can't match key %s in map %s. reason: %s",
- inkey, inmap, yperr_string(r));
+ errx(1, "can't match key %s in map %s. Reason: %s",
+ inkey, inmap, yperr_string(r));
+ rval = 1;
+ break;
}
}
- exit(0);
+ exit(rval);
}
diff --git a/usr.bin/ypwhich/ypwhich.c b/usr.bin/ypwhich/ypwhich.c
index b31dcae..14fc1b3 100644
--- a/usr.bin/ypwhich/ypwhich.c
+++ b/usr.bin/ypwhich/ypwhich.c
@@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$");
extern bool_t xdr_domainname();
-struct ypalias {
+static const struct ypalias {
char *alias, *name;
} ypaliases[] = {
{ "passwd", "passwd.byname" },
OpenPOWER on IntegriCloud