From owner-p4-projects@FreeBSD.ORG Sat Jun 7 18:47:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 05B691065685; Sat, 7 Jun 2008 18:47:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A35371065673 for ; Sat, 7 Jun 2008 18:47:23 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 98D2A8FC14 for ; Sat, 7 Jun 2008 18:47:23 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m57IlNCR047271 for ; Sat, 7 Jun 2008 18:47:23 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m57IlNdO047269 for perforce@freebsd.org; Sat, 7 Jun 2008 18:47:23 GMT (envelope-from sam@freebsd.org) Date: Sat, 7 Jun 2008 18:47:23 GMT Message-Id: <200806071847.m57IlNdO047269@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 143087 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2008 18:47:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=143087 Change 143087 by sam@sam_ebb on 2008/06/07 18:46:46 IFC @ 143086 Affected files ... .. //depot/projects/vap/MAINTAINERS#5 integrate .. //depot/projects/vap/bin/ln/ln.1#3 integrate .. //depot/projects/vap/bin/ln/ln.c#3 integrate .. //depot/projects/vap/bin/sh/alias.c#3 integrate .. //depot/projects/vap/contrib/cvs/src/classify.c#6 integrate .. //depot/projects/vap/etc/rc.firewall#5 integrate .. //depot/projects/vap/sbin/geom/class/part/geom_part.c#5 integrate .. //depot/projects/vap/sbin/geom/class/part/gpart.8#3 integrate .. //depot/projects/vap/sbin/geom/misc/subr.c#3 integrate .. //depot/projects/vap/sbin/geom/misc/subr.h#3 integrate .. //depot/projects/vap/sbin/natd/natd.c#3 integrate .. //depot/projects/vap/sys/arm/conf/GUMSTIX#1 branch .. //depot/projects/vap/sys/arm/conf/GUMSTIX.hints#1 branch .. //depot/projects/vap/sys/arm/include/intr.h#7 integrate .. //depot/projects/vap/sys/arm/xscale/pxa/files.pxa#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/if_smc_smi.c#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/pxa_gpio.c#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/pxa_icu.c#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/pxa_machdep.c#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/pxa_obio.c#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/pxa_smi.c#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/pxa_space.c#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/pxa_timer.c#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/pxareg.h#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/pxavar.h#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/std.pxa#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/uart_bus_pxa.c#1 branch .. //depot/projects/vap/sys/arm/xscale/pxa/uart_cpu_pxa.c#1 branch .. //depot/projects/vap/sys/boot/common/ufsread.c#6 integrate .. //depot/projects/vap/sys/boot/i386/libi386/biossmap.c#5 integrate .. //depot/projects/vap/sys/conf/files#42 edit .. //depot/projects/vap/sys/conf/kern.pre.mk#7 edit .. //depot/projects/vap/sys/conf/newvers.sh#5 integrate .. //depot/projects/vap/sys/conf/options#24 edit .. //depot/projects/vap/sys/conf/options.arm#6 integrate .. //depot/projects/vap/sys/dev/ath/if_ath.c#85 integrate .. //depot/projects/vap/sys/dev/bktr/bktr_i2c.c#5 integrate .. //depot/projects/vap/sys/dev/cs/if_cs.c#7 integrate .. //depot/projects/vap/sys/dev/cs/if_cs_isa.c#6 integrate .. //depot/projects/vap/sys/dev/cs/if_cs_pccard.c#7 integrate .. //depot/projects/vap/sys/dev/cs/if_csreg.h#3 integrate .. //depot/projects/vap/sys/dev/cs/if_csvar.h#7 integrate .. //depot/projects/vap/sys/dev/ichsmb/ichsmb.c#6 integrate .. //depot/projects/vap/sys/dev/ichsmb/ichsmb_pci.c#6 integrate .. //depot/projects/vap/sys/dev/ichsmb/ichsmb_var.h#5 integrate .. //depot/projects/vap/sys/dev/iicbus/iicsmb.c#5 integrate .. //depot/projects/vap/sys/dev/iwi/if_iwi.c#34 integrate .. //depot/projects/vap/sys/dev/iwn/if_iwn.c#23 integrate .. //depot/projects/vap/sys/dev/mii/miidevs#11 integrate .. //depot/projects/vap/sys/dev/mii/smcphy.c#1 branch .. //depot/projects/vap/sys/dev/ral/rt2560.c#40 integrate .. //depot/projects/vap/sys/dev/ral/rt2661.c#38 integrate .. //depot/projects/vap/sys/dev/si/si.c#5 integrate .. //depot/projects/vap/sys/dev/si/si.h#3 integrate .. //depot/projects/vap/sys/dev/smbus/smb.c#5 integrate .. //depot/projects/vap/sys/dev/smc/if_smc.c#1 branch .. //depot/projects/vap/sys/dev/smc/if_smcreg.h#1 branch .. //depot/projects/vap/sys/dev/smc/if_smcvar.h#1 branch .. //depot/projects/vap/sys/dev/usb/if_rum.c#26 integrate .. //depot/projects/vap/sys/dev/usb/if_ural.c#24 integrate .. //depot/projects/vap/sys/dev/usb/if_zyd.c#25 integrate .. //depot/projects/vap/sys/dev/wpi/if_wpi.c#28 integrate .. //depot/projects/vap/sys/net80211/ieee80211_node.c#40 edit .. //depot/projects/vap/sys/net80211/ieee80211_var.h#47 integrate .. //depot/projects/vap/sys/pci/amdpm.c#6 integrate .. //depot/projects/vap/sys/pci/amdsmb.c#4 integrate .. //depot/projects/vap/sys/pci/intpm.c#7 integrate .. //depot/projects/vap/sys/pci/nfsmb.c#4 integrate .. //depot/projects/vap/sys/pci/viapm.c#6 integrate .. //depot/projects/vap/sys/vm/vm_page.c#11 integrate .. //depot/projects/vap/usr.sbin/config/Makefile#3 integrate .. //depot/projects/vap/usr.sbin/sicontrol/Makefile#3 integrate .. //depot/projects/vap/usr.sbin/sicontrol/sicontrol.c#4 integrate Differences ... ==== //depot/projects/vap/MAINTAINERS#5 (text+ko) ==== @@ -1,8 +1,8 @@ -$FreeBSD: src/MAINTAINERS,v 1.149 2008/06/04 07:37:26 rafan Exp $ +$FreeBSD: src/MAINTAINERS,v 1.150 2008/06/06 21:32:01 peter Exp $ Please note that the content of this file is strictly advisory. No locks listed here are valid. The only strict review requirements -are granted by core. These are documented in src/LOCKS and enforced +are granted by core. These are documented in head/LOCKS and enforced by CVSROOT/approvers. The source tree is a community effort. However, some folks go to the ==== //depot/projects/vap/bin/ln/ln.1#3 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)ln.1 8.2 (Berkeley) 12/30/93 -.\" $FreeBSD: src/bin/ln/ln.1,v 1.32 2007/11/17 21:01:22 ru Exp $ +.\" $FreeBSD: src/bin/ln/ln.1,v 1.33 2008/06/06 08:27:59 keramida Exp $ .\" -.Dd February 14, 2006 +.Dd June 6, 2008 .Dt LN 1 .Os .Sh NAME @@ -42,13 +42,13 @@ .Sh SYNOPSIS .Nm .Op Fl s Op Fl F -.Op Fl f | i +.Op Fl f | iw .Op Fl hnv .Ar source_file .Op Ar target_file .Nm .Op Fl s Op Fl F -.Op Fl f | i +.Op Fl f | iw .Op Fl hnv .Ar source_file ... .Ar target_dir @@ -79,6 +79,8 @@ .Fl f option overrides any previous .Fl i +and +.Fl w options.) .It Fl F If the target file already exists and is a directory, then remove it @@ -134,6 +136,8 @@ Cause .Nm to be verbose, showing files as they are processed. +.It Fl w +Warn if the source of a symbolic link does not currently exist. .El .Pp By default, @@ -194,9 +198,10 @@ The .Fl h , .Fl i , -.Fl n +.Fl n , +.Fl v and -.Fl v +.Fl w options are non-standard and their use in scripts is not recommended. They are provided solely for compatibility with other .Nm ==== //depot/projects/vap/bin/ln/ln.c#3 (text+ko) ==== @@ -39,7 +39,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/ln/ln.c,v 1.36 2007/11/17 21:01:22 ru Exp $"); +__FBSDID("$FreeBSD: src/bin/ln/ln.c,v 1.38 2008/06/07 09:37:30 keramida Exp $"); #include #include @@ -58,6 +58,8 @@ int iflag; /* Interactive mode. */ int sflag; /* Symbolic, not hard, link. */ int vflag; /* Verbose output. */ +int wflag; /* Warn if symlink target does not + * exist, and -f is not enabled. */ /* System link call. */ int (*linkf)(const char *, const char *); char linkch; @@ -92,7 +94,7 @@ exit(linkit(argv[0], argv[1], 0)); } - while ((ch = getopt(argc, argv, "Ffhinsv")) != -1) + while ((ch = getopt(argc, argv, "Ffhinsvw")) != -1) switch (ch) { case 'F': Fflag = 1; @@ -100,6 +102,7 @@ case 'f': fflag = 1; iflag = 0; + wflag = 0; break; case 'h': case 'n': @@ -115,6 +118,9 @@ case 'v': vflag = 1; break; + case 'w': + wflag = 1; + break; case '?': default: usage(); @@ -127,8 +133,10 @@ linkch = sflag ? '-' : '='; if (sflag == 0) Fflag = 0; - if (Fflag == 1 && iflag == 0) + if (Fflag == 1 && iflag == 0) { fflag = 1; + wflag = 0; /* Implied when fflag != 0 */ + } switch(argc) { case 0: @@ -167,6 +175,7 @@ const char *p; int ch, exists, first; char path[PATH_MAX]; + char wbuf[PATH_MAX]; if (!sflag) { /* If source doesn't exist, quit now. */ @@ -204,6 +213,32 @@ exists = !lstat(target, &sb); /* + * If the link source doesn't exist, and a symbolic link was + * requested, and -w was specified, give a warning. + */ + if (sflag && wflag) { + if (*source == '/') { + /* Absolute link source. */ + if (stat(source, &sb) != 0) + warn("warning: %s inaccessible", source); + } else { + /* + * Relative symlink source. Try to construct the + * absolute path of the source, by appending `source' + * to the parent directory of the target. + */ + p = strrchr(target, '/'); + if (p != NULL) + p++; + else + p = target; + (void)snprintf(wbuf, sizeof(wbuf), "%.*s%s", + (int)(p - target), target, source); + if (stat(wbuf, &sb) != 0) + warn("warning: %s", source); + } + } + /* * If the file exists, then unlink it forcibly if -f was specified * and interactively if -i was specified. */ ==== //depot/projects/vap/bin/sh/alias.c#3 (text+ko) ==== @@ -36,11 +36,10 @@ #endif #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/bin/sh/alias.c,v 1.20 2005/09/02 22:43:28 stefanf Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/alias.c,v 1.22 2008/06/07 16:28:20 rse Exp $"); #include #include "shell.h" -#include "input.h" #include "output.h" #include "error.h" #include "memalloc.h" @@ -53,8 +52,8 @@ STATIC struct alias *atab[ATABSIZE]; STATIC void setalias(char *, char *); -STATIC int unalias(char *); -STATIC struct alias **hashalias(char *); +STATIC int unalias(const char *); +STATIC struct alias **hashalias(const char *); STATIC void @@ -111,7 +110,7 @@ } STATIC int -unalias(char *name) +unalias(const char *name) { struct alias *ap, **app; @@ -248,7 +247,7 @@ } STATIC struct alias ** -hashalias(char *p) +hashalias(const char *p) { unsigned int hashval; ==== //depot/projects/vap/contrib/cvs/src/classify.c#6 (text+ko) ==== @@ -41,6 +41,7 @@ * changed by -A... */ || (strlen (vers->entdata->options) + && strcmp (vers->entdata->options, vers->options) && strcmp (vers->entdata->options, "-kkv") && strcmp (vers->entdata->options, "-kb")))) /* ...or... */ ==== //depot/projects/vap/etc/rc.firewall#5 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.firewall,v 1.54 2008/01/21 04:41:17 rafan Exp $ +# $FreeBSD: src/etc/rc.firewall,v 1.55 2008/06/06 07:17:04 keramida Exp $ # # @@ -171,6 +171,9 @@ mask="255.255.255.0" ip="192.0.2.1" + # Allow limited broadcast traffic from my own net. + ${fwcmd} add pass all from ${net}:${mask} to 255.255.255.255 + # Allow any traffic to or from my own net. ${fwcmd} add pass all from ${ip} to ${net}:${mask} ${fwcmd} add pass all from ${net}:${mask} to ${ip} ==== //depot/projects/vap/sbin/geom/class/part/geom_part.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/geom/class/part/geom_part.c,v 1.6 2008/06/04 20:07:59 marcel Exp $"); +__FBSDID("$FreeBSD: src/sbin/geom/class/part/geom_part.c,v 1.7 2008/06/06 23:58:29 marcel Exp $"); #include #include @@ -56,6 +56,10 @@ static char optional[] = ""; static char flags[] = "C"; +static char bootcode_param[] = "bootcode"; +static char index_param[] = "index"; +static char partcode_param[] = "partcode"; + static void gpart_bootcode(struct gctl_req *, unsigned int); static void gpart_show(struct gctl_req *, unsigned int); @@ -64,14 +68,16 @@ { 'b', "start", NULL, G_TYPE_STRING }, { 's', "size", NULL, G_TYPE_STRING }, { 't', "type", NULL, G_TYPE_STRING }, - { 'i', "index", optional, G_TYPE_STRING }, + { 'i', index_param, optional, G_TYPE_STRING }, { 'l', "label", optional, G_TYPE_STRING }, { 'f', "flags", flags, G_TYPE_STRING }, G_OPT_SENTINEL }, "geom", NULL }, { "bootcode", 0, gpart_bootcode, { - { 'b', "bootcode", NULL, G_TYPE_STRING }, + { 'b', bootcode_param, optional, G_TYPE_STRING }, + { 'p', partcode_param, optional, G_TYPE_STRING }, + { 'i', index_param, optional, G_TYPE_STRING }, { 'f', "flags", flags, G_TYPE_STRING }, G_OPT_SENTINEL }, "geom", NULL @@ -85,7 +91,7 @@ "provider", NULL }, { "delete", 0, NULL, { - { 'i', "index", NULL, G_TYPE_STRING }, + { 'i', index_param, NULL, G_TYPE_STRING }, { 'f', "flags", flags, G_TYPE_STRING }, G_OPT_SENTINEL }, "geom", NULL @@ -95,7 +101,7 @@ G_OPT_SENTINEL }, "geom", NULL }, { "modify", 0, NULL, { - { 'i', "index", NULL, G_TYPE_STRING }, + { 'i', index_param, NULL, G_TYPE_STRING }, { 'l', "label", optional, G_TYPE_STRING }, { 't', "type", optional, G_TYPE_STRING }, { 'f', "flags", flags, G_TYPE_STRING }, @@ -286,38 +292,150 @@ geom_deletetree(&mesh); } -static void -gpart_bootcode(struct gctl_req *req, unsigned int fl __unused) +static void * +gpart_bootfile_read(const char *bootfile, ssize_t *size) { struct stat sb; - const char *bootfile; void *code; - int error, fd, size; + int fd; - bootfile = gctl_get_ascii(req, "bootcode"); - if (bootfile == NULL) - errx(EXIT_FAILURE, "Missing bootfile argument"); - - error = stat(bootfile, &sb); - if (error) - errx(EXIT_FAILURE, "%s: not found", bootfile); + if (stat(bootfile, &sb) == -1) + err(EXIT_FAILURE, "%s", bootfile); if (!S_ISREG(sb.st_mode)) errx(EXIT_FAILURE, "%s: not a regular file", bootfile); - if (sb.st_size >= 1024*1024) - errx(EXIT_FAILURE, "%s: file too big", bootfile); + if (sb.st_size == 0) + errx(EXIT_FAILURE, "%s: empty file", bootfile); + if (*size > 0 && sb.st_size >= *size) + errx(EXIT_FAILURE, "%s: file too big (%zu limit)", bootfile, + *size); - size = sb.st_size; + *size = sb.st_size; fd = open(bootfile, O_RDONLY); if (fd == -1) - errx(EXIT_FAILURE, "%s: unable to open", bootfile); - code = malloc(size); + err(EXIT_FAILURE, "%s", bootfile); + code = malloc(*size); if (code == NULL) - errx(EXIT_FAILURE, "out of memory"); - if (read(fd, code, size) != size) - errx(EXIT_FAILURE, "%s: unable to read", bootfile); + err(EXIT_FAILURE, NULL); + if (read(fd, code, *size) != *size) + err(EXIT_FAILURE, "%s", bootfile); close(fd); - gctl_change_param(req, "bootcode", size, code); - gctl_issue(req); + return (code); +} + +static void +gpart_write_partcode(struct gctl_req *req, int idx, void *code, ssize_t size) +{ + char dsf[128]; + struct gmesh mesh; + struct gclass *classp; + struct ggeom *gp; + struct gprovider *pp; + const char *s; + int error, fd; + + s = gctl_get_ascii(req, "class"); + if (s == NULL) + abort(); + error = geom_gettree(&mesh); + if (error != 0) + errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); + classp = find_class(&mesh, s); + if (classp == NULL) { + geom_deletetree(&mesh); + errx(EXIT_FAILURE, "Class %s not found.", s); + } + s = gctl_get_ascii(req, "geom"); + gp = find_geom(classp, s); + if (gp == NULL) + errx(EXIT_FAILURE, "No such geom: %s.", s); + + LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { + s = find_provcfg(pp, "index"); + if (s == NULL) + continue; + if (atoi(s) == idx) + break; + } + + if (pp != NULL) { + snprintf(dsf, sizeof(dsf), "/dev/%s", pp->lg_name); + fd = open(dsf, O_WRONLY); + if (fd == -1) + err(EXIT_FAILURE, "%s", dsf); + if (lseek(fd, size, SEEK_SET) != size) + errx(EXIT_FAILURE, "%s: not enough space", dsf); + if (lseek(fd, 0, SEEK_SET) != 0) + err(EXIT_FAILURE, "%s", dsf); + if (write(fd, code, size) != size) + err(EXIT_FAILURE, "%s", dsf); + close(fd); + } else + errx(EXIT_FAILURE, "invalid partition index"); + + geom_deletetree(&mesh); +} + +static void +gpart_bootcode(struct gctl_req *req, unsigned int fl __unused) +{ + const char *s; + char *sp; + void *bootcode, *partcode; + size_t bootsize, partsize; + int error, idx; + + if (gctl_has_param(req, bootcode_param)) { + s = gctl_get_ascii(req, bootcode_param); + bootsize = 64 * 1024; /* Arbitrary limit. */ + bootcode = gpart_bootfile_read(s, &bootsize); + error = gctl_change_param(req, bootcode_param, bootsize, + bootcode); + if (error) + errc(EXIT_FAILURE, error, "internal error"); + } else { + bootcode = NULL; + bootsize = 0; + } + + if (gctl_has_param(req, partcode_param)) { + s = gctl_get_ascii(req, partcode_param); + partsize = bootsize * 1024; + partcode = gpart_bootfile_read(s, &partsize); + error = gctl_delete_param(req, partcode_param); + if (error) + errc(EXIT_FAILURE, error, "internal error"); + } else { + partcode = NULL; + partsize = 0; + } + + if (gctl_has_param(req, index_param)) { + if (partcode == NULL) + errx(EXIT_FAILURE, "-i is only valid with -p"); + s = gctl_get_ascii(req, index_param); + idx = strtol(s, &sp, 10); + if (idx < 1 || *s == '\0' || *sp != '\0') + errx(EXIT_FAILURE, "invalid partition index"); + error = gctl_delete_param(req, index_param); + if (error) + errc(EXIT_FAILURE, error, "internal error"); + } else + idx = 0; + + if (partcode != NULL) { + if (idx == 0) + errx(EXIT_FAILURE, "missing -i option"); + gpart_write_partcode(req, idx, partcode, partsize); + } else { + if (bootcode == NULL) + errx(EXIT_FAILURE, "no -b nor -p"); + } + + if (bootcode != NULL) { + s = gctl_issue(req); + if (s != NULL) + errx(EXIT_FAILURE, "%s", s); + } } ==== //depot/projects/vap/sbin/geom/class/part/gpart.8#3 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" Copyright (c) 2007 Marcel Moolenaar +.\" Copyright (c) 2007, 2008 Marcel Moolenaar .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/sbin/geom/class/part/gpart.8,v 1.2 2007/10/21 00:04:23 marcel Exp $ +.\" $FreeBSD: src/sbin/geom/class/part/gpart.8,v 1.4 2008/06/07 00:14:06 marcel Exp $ .\" -.Dd Oct 20, 2007 +.Dd Jun 6, 2008 .Dt GPART 8 .Os .Sh NAME @@ -36,16 +36,24 @@ lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "options GEOM_PART_APM" +.Cd "options GEOM_PART_BSD" .Cd "options GEOM_PART_GPT" .Cd "options GEOM_PART_MBR" +.Cd "options GEOM_PART_PC98" +.Cd "options GEOM_PART_VTOC8" .Ed .Pp The GEOM_PART_APM option adds support for the Apple Partition Map (APM) found on Apple Macintosh computers. +The GEOM_PART_BSD option adds support for the traditional BSD disklabel. The GEOM_PART_GPT option adds support for the GUID Partition Table (GPT) found on Intel Itanium computers and Intel-based Macintosh computers. The GEOM_PART_MBR option adds support for the Master Boot Record (MBR) found on PCs and used on many removable media. +The GEOM_PART_PC98 option adds support for the MBR variant as used on +NEC PC-98 computers. +The GEOM_PART_VTOC8 option adds support for Sun's SMI VTOC8 label as +found on UltraSPARC-based computers. .Pp Usage of the .Xr gpart 8 @@ -61,6 +69,13 @@ .Op Fl l Ar label .Op Fl f Ar flags .Ar geom +.\" ==== BOOTCODE ==== +.Nm +.Cm bootcode +.Op Fl b Ar bootcode +.Op Fl p Ar partcode Fl i Ar index +.Op Fl f Ar flags +.Ar geom .\" ==== COMMIT ==== .Nm .Cm commit @@ -122,7 +137,7 @@ Partition types are discussed in the section entitled "Partition Types". .Pp Addition options include: -.Bl -tag -width ".Fl w Ar wwwwwww" +.Bl -tag -width ".Fl w Ar wwwwwwww" .It Fl i Ar index The index in the partition table at which the new partition is to be placed. The index determines the name of the device special file used @@ -136,6 +151,36 @@ See the section entitled "Operational flags" below for a discussion about its use. .El +.\" ==== BOOTCODE ==== +.It Cm bootcode +Embed bootstrap code into the partitioning scheme's metadata on the +.Ar geom +(using +.Fl b Ar bootcode ) +or write bootstrap code into a partition (using +.Fl p Ar partcode +and +.Fl i Ar index ) . +Not all partitioning schemes have embedded bootstrap code, so the +.Fl b Ar bootcode +option is scheme-specific in nature. +For the GPT scheme, embedded bootstrap code is supported. +The bootstrap code is embedded in the protective MBR rather than the GPT. +The +.Fl b Ar bootcode +option specifies a file that contains the bootstrap code. +The contents and size of the file are determined by the partitioning +scheme. +For the MBR scheme, it's a 512 byte file of which the first 446 bytes +are installed as bootstrap code. +The +.Fl p Ar partcode +option specifies a file that contains the bootstrap code intended to be +written to a partition. +The partition is specified by the +.Fl i Ar index +option. +The size of the file must be smaller than the size of the partition. .\" ==== COMMIT ==== .It Cm commit Commit any pending changes for geom ==== //depot/projects/vap/sbin/geom/misc/subr.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/geom/misc/subr.c,v 1.7 2007/01/25 11:35:27 pjd Exp $"); +__FBSDID("$FreeBSD: src/sbin/geom/misc/subr.c,v 1.8 2008/06/06 22:44:03 marcel Exp $"); #include #include @@ -414,3 +414,47 @@ } return (ENOENT); } + +int +gctl_delete_param(struct gctl_req *req, const char *name) +{ + struct gctl_req_arg *ap; + unsigned int i; + + if (req == NULL || req->error != NULL) + return (EDOOFUS); + + i = 0; + while (i < req->narg) { + ap = &req->arg[i]; + if (strcmp(ap->name, name) == 0) + break; + i++; + } + if (i == req->narg) + return (ENOENT); + + req->narg--; + while (i < req->narg) { + req->arg[i] = req->arg[i + 1]; + i++; + } + return (0); +} + +int +gctl_has_param(struct gctl_req *req, const char *name) +{ + struct gctl_req_arg *ap; + unsigned int i; + + if (req == NULL || req->error != NULL) + return (0); + + for (i = 0; i < req->narg; i++) { + ap = &req->arg[i]; + if (strcmp(ap->name, name) == 0) + return (1); + } + return (0); +} ==== //depot/projects/vap/sbin/geom/misc/subr.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sbin/geom/misc/subr.h,v 1.8 2007/01/25 11:35:27 pjd Exp $ + * $FreeBSD: src/sbin/geom/misc/subr.h,v 1.9 2008/06/06 22:44:03 marcel Exp $ */ #ifndef _SUBR_H_ @@ -47,4 +47,7 @@ const char *gctl_get_ascii(struct gctl_req *req, const char *pfmt, ...) __printflike(2, 3); int gctl_change_param(struct gctl_req *req, const char *name, int len, const void *value); +int gctl_delete_param(struct gctl_req *req, const char *name); +int gctl_has_param(struct gctl_req *req, const char *name); + #endif /* !_SUBR_H_ */ ==== //depot/projects/vap/sbin/natd/natd.c#3 (text+ko) ==== @@ -11,7 +11,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/natd/natd.c,v 1.50 2006/09/26 23:26:51 piso Exp $"); +__FBSDID("$FreeBSD: src/sbin/natd/natd.c,v 1.51 2008/06/06 08:59:55 brian Exp $"); #define SYSLOG_NAMES @@ -884,7 +884,7 @@ err(1, "iflist-sysctl-estimate"); if ((buf = malloc(needed)) == NULL) errx(1, "malloc failed"); - if (sysctl(mib, 6, buf, &needed, NULL, 0) == -1) + if (sysctl(mib, 6, buf, &needed, NULL, 0) == -1 && errno != ENOMEM) err(1, "iflist-sysctl-get"); lim = buf + needed; /* ==== //depot/projects/vap/sys/arm/include/intr.h#7 (text+ko) ==== @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/arm/include/intr.h,v 1.8 2008/04/20 23:29:06 cognet Exp $ + * $FreeBSD: src/sys/arm/include/intr.h,v 1.9 2008/06/06 05:08:09 benno Exp $ * */ @@ -41,6 +41,9 @@ #ifdef CPU_XSCALE_81342 #define NIRQ 128 +#elif defined(CPU_XSCALE_PXA2X0) +#include +#define NIRQ IRQ_GPIO_MAX #elif defined(CPU_ARM9) #define NIRQ 64 #else ==== //depot/projects/vap/sys/boot/common/ufsread.c#6 (text+ko) ==== @@ -44,7 +44,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/common/ufsread.c,v 1.17 2007/10/26 21:02:31 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/common/ufsread.c,v 1.18 2008/06/07 05:49:24 kib Exp $"); #include #include @@ -249,7 +249,7 @@ } else if (lbn < NDADDR + NINDIR(fs)) { n = INDIRPERVBLK(fs); addr = DIP(di_ib[0]); - u = (u_int)(lbn - NDADDR) / (n * DBPERVBLK); + u = (u_int)(lbn - NDADDR) / n * DBPERVBLK; vbaddr = fsbtodb(fs, addr) + u; if (indmap != vbaddr) { if (dskread(indbuf, vbaddr, DBPERVBLK)) ==== //depot/projects/vap/sys/boot/i386/libi386/biossmap.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biossmap.c,v 1.7 2007/10/28 21:23:49 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/biossmap.c,v 1.8 2008/06/07 03:07:32 jhb Exp $"); /* * Obtain memory configuration information from the BIOS @@ -39,7 +39,10 @@ #include "libi386.h" #include "btxv86.h" -static struct bios_smap smap; +static struct { + struct bios_smap _smap_entry; + char pad[8]; /* Bad BIOS writer, no cookie! */ +} smap; static struct bios_smap *smapbase; static int smaplen; ==== //depot/projects/vap/sys/conf/files#42 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1299 2008/05/18 19:47:49 jb Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1307 2008/06/06 05:00:49 benno Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -426,6 +426,7 @@ dev/advansys/adwcam.c optional adw dev/advansys/adwlib.c optional adw dev/advansys/adwmcode.c optional adw +dev/age/if_age.c optional age pci dev/agp/agp.c optional agp pci dev/agp/agp_if.m optional agp pci dev/aha/aha.c optional aha @@ -671,28 +672,11 @@ dev/fxp/if_fxp.c optional fxp dev/gem/if_gem.c optional gem dev/gem/if_gem_pci.c optional gem pci -#dev/harp/if_harp.c optional harp pci dev/hatm/if_hatm.c optional hatm pci dev/hatm/if_hatm_intr.c optional hatm pci dev/hatm/if_hatm_ioctl.c optional hatm pci dev/hatm/if_hatm_rx.c optional hatm pci dev/hatm/if_hatm_tx.c optional hatm pci -#dev/hfa/fore_buffer.c optional hfa -#dev/hfa/fore_command.c optional hfa -#dev/hfa/fore_globals.c optional hfa -#dev/hfa/fore_if.c optional hfa -#dev/hfa/fore_init.c optional hfa -#dev/hfa/fore_intr.c optional hfa -#dev/hfa/fore_output.c optional hfa -#dev/hfa/fore_receive.c optional hfa -#dev/hfa/fore_stats.c optional hfa -#dev/hfa/fore_timer.c optional hfa -#dev/hfa/fore_transmit.c optional hfa -#dev/hfa/fore_vcm.c optional hfa -##dev/hfa/hfa_eisa.c optional hfa eisa -#dev/hfa/hfa_freebsd.c optional hfa -#dev/hfa/hfa_pci.c optional hfa pci -##dev/hfa/hfa_sbus.c optional hfa sbus dev/hifn/hifn7751.c optional hifn dev/hme/if_hme.c optional hme dev/hme/if_hme_pci.c optional hme pci @@ -866,6 +850,7 @@ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_82598.c optional ixgbe \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/jme/if_jme.c optional jme pci dev/joy/joy.c optional joy dev/joy/joy_isa.c optional joy isa dev/joy/joy_pccard.c optional joy pccard @@ -894,6 +879,7 @@ dev/mfi/mfi_cam.c optional mfip scbus dev/mii/acphy.c optional miibus | acphy dev/mii/amphy.c optional miibus | amphy +dev/mii/atphy.c optional miibus | atphy dev/mii/bmtphy.c optional miibus | bmtphy dev/mii/brgphy.c optional miibus | brgphy dev/mii/ciphy.c optional miibus | ciphy @@ -905,6 +891,7 @@ # XXX only fxp cards? dev/mii/inphy.c optional miibus | inphy dev/mii/ip1000phy.c optional miibus | ip1000phy +dev/mii/jmphy.c optional miibus | jmphy dev/mii/lxtphy.c optional miibus | lxtphy dev/mii/mii.c optional miibus | mii dev/mii/mii_physubr.c optional miibus | mii @@ -920,6 +907,7 @@ dev/mii/rlswitch.c optional rlswitch # XXX rue only? dev/mii/ruephy.c optional miibus | ruephy +dev/mii/smcphy.c optional miibus | smcphy dev/mii/tdkphy.c optional miibus | tdkphy dev/mii/tlphy.c optional miibus | tlphy dev/mii/ukphy.c optional miibus | mii @@ -1126,6 +1114,7 @@ dev/smbus/smbconf.c optional smbus dev/smbus/smbus.c optional smbus dev/smbus/smbus_if.m optional smbus +dev/smc/if_smc.c optional smc dev/sn/if_sn.c optional sn dev/sn/if_sn_isa.c optional sn isa dev/sn/if_sn_pccard.c optional sn pccard @@ -1536,62 +1525,6 @@ gnu/fs/reiserfs/reiserfs_vfsops.c optional reiserfs gnu/fs/reiserfs/reiserfs_vnops.c optional reiserfs # -# isdn4bsd device drivers -# -i4b/driver/i4b_trace.c optional i4btrc -i4b/driver/i4b_rbch.c optional i4brbch -i4b/driver/i4b_tel.c optional i4btel -#XXXBZ#i4b/driver/i4b_ipr.c optional i4bipr -net/slcompress.c optional i4bipr | i4bisppp -i4b/driver/i4b_ctl.c optional i4bctl -#XXXBZ#i4b/driver/i4b_ing.c optional i4bing -#XXXBZ#i4b/driver/i4b_isppp.c optional i4bisppp -# -# isdn4bsd CAPI driver -# -i4b/capi/capi_l4if.c optional i4bcapi -i4b/capi/capi_llif.c optional i4bcapi -i4b/capi/capi_msgs.c optional i4bcapi -# -# isdn4bsd AVM B1/T1 CAPI driver -# -i4b/capi/iavc/iavc_pci.c optional iavc i4bcapi pci -i4b/capi/iavc/iavc_isa.c optional iavc i4bcapi isa -i4b/capi/iavc/iavc_lli.c optional iavc i4bcapi -i4b/capi/iavc/iavc_card.c optional iavc i4bcapi -# -# isdn4bsd support -# -i4b/layer2/i4b_mbuf.c optional i4btrc -# -# isdn4bsd Q.921 handler -# -i4b/layer2/i4b_l2.c optional i4bq921 -i4b/layer2/i4b_l2fsm.c optional i4bq921 -i4b/layer2/i4b_uframe.c optional i4bq921 -i4b/layer2/i4b_tei.c optional i4bq921 -i4b/layer2/i4b_sframe.c optional i4bq921 -i4b/layer2/i4b_iframe.c optional i4bq921 -i4b/layer2/i4b_l2timer.c optional i4bq921 -i4b/layer2/i4b_util.c optional i4bq921 -i4b/layer2/i4b_lme.c optional i4bq921 -# -# isdn4bsd Q.931 handler -# -i4b/layer3/i4b_q931.c optional i4bq931 -i4b/layer3/i4b_l3fsm.c optional i4bq931 -i4b/layer3/i4b_l3timer.c optional i4bq931 -i4b/layer3/i4b_l2if.c optional i4bq931 -i4b/layer3/i4b_l4if.c optional i4bq931 -i4b/layer3/i4b_q932fac.c optional i4bq931 -# -# isdn4bsd control device driver, interface to isdnd -# -i4b/layer4/i4b_i4bdrv.c optional i4b -i4b/layer4/i4b_l4.c optional i4b -i4b/layer4/i4b_l4mgmt.c optional i4b -i4b/layer4/i4b_l4timer.c optional i4b -# isa/isa_if.m standard isa/isa_common.c optional isa isa/isahint.c optional isa @@ -1687,6 +1620,7 @@ kern/subr_autoconf.c standard kern/subr_blist.c standard kern/subr_bus.c standard +kern/subr_clist.c standard kern/subr_clock.c standard kern/subr_devstat.c standard kern/subr_disk.c standard @@ -1734,7 +1668,6 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<<