CVS commit: src/sbin/gpt
Module Name:src Committed By: jnemeth Date: Sun Sep 28 08:14:51 UTC 2014 Modified Files: src/sbin/gpt: Makefile gpt.8 gpt.c gpt.h Added Files: src/sbin/gpt: type.c Log Message: PR/44218 - David Young -- add type subcommand to change a partition type To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sbin/gpt/Makefile cvs rdiff -u -r1.30 -r1.31 src/sbin/gpt/gpt.8 cvs rdiff -u -r1.29 -r1.30 src/sbin/gpt/gpt.c cvs rdiff -u -r1.12 -r1.13 src/sbin/gpt/gpt.h cvs rdiff -u -r0 -r1.1 src/sbin/gpt/type.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/Makefile diff -u src/sbin/gpt/Makefile:1.9 src/sbin/gpt/Makefile:1.10 --- src/sbin/gpt/Makefile:1.9 Tue Sep 23 07:47:54 2014 +++ src/sbin/gpt/Makefile Sun Sep 28 08:14:51 2014 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.9 2014/09/23 07:47:54 jnemeth Exp $ +# $NetBSD: Makefile,v 1.10 2014/09/28 08:14:51 jnemeth Exp $ # $FreeBSD: src/sbin/gpt/Makefile,v 1.7 2005/09/01 02:49:20 marcel Exp $ PROG= gpt SRCS= add.c backup.c biosboot.c create.c destroy.c gpt.c label.c map.c \ migrate.c recover.c remove.c resize.c resizedisk.c restore.c \ - set.c show.c unset.c + set.c show.c type.c unset.c MAN= gpt.8 LDADD+= -lprop -lutil Index: src/sbin/gpt/gpt.8 diff -u src/sbin/gpt/gpt.8:1.30 src/sbin/gpt/gpt.8:1.31 --- src/sbin/gpt/gpt.8:1.30 Tue Sep 23 07:47:54 2014 +++ src/sbin/gpt/gpt.8 Sun Sep 28 08:14:51 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: gpt.8,v 1.30 2014/09/23 07:47:54 jnemeth Exp $ +.\ $NetBSD: gpt.8,v 1.31 2014/09/28 08:14:51 jnemeth Exp $ .\ .\ Copyright (c) 2002 Marcel Moolenaar .\ All rights reserved. @@ -26,7 +26,7 @@ .\ .\ $FreeBSD: src/sbin/gpt/gpt.8,v 1.17 2006/06/22 22:22:32 marcel Exp $ .\ -.Dd September 23, 2014 +.Dd September 28, 2014 .Dt GPT 8 .Os .Sh NAME @@ -457,6 +457,18 @@ The order of precedence for the options .Fl l , .Fl g , .Fl u . +.\ type +.It Nm Ic type Oo Fl a Oc Fl T Ar newtype Ar device ... +.It Nm Ic type Oo Fl b Ar blocknr Oc Oo Fl i Ar index Oc \ +Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc Fl T Ar newtype Ar device ... +The +.Ic type +command allows the user to change the type of any and all partitions +that match the selection. +It uses the same selection options as the +.Ic label +command. +See above for a description of these options. .\ unset .It Nm Ic unset Fl a Ar attribute Fl i Ar index Ar device ... The Index: src/sbin/gpt/gpt.c diff -u src/sbin/gpt/gpt.c:1.29 src/sbin/gpt/gpt.c:1.30 --- src/sbin/gpt/gpt.c:1.29 Tue Sep 23 07:47:54 2014 +++ src/sbin/gpt/gpt.c Sun Sep 28 08:14:51 2014 @@ -31,7 +31,7 @@ __FBSDID($FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $); #endif #ifdef __RCSID -__RCSID($NetBSD: gpt.c,v 1.29 2014/09/23 07:47:54 jnemeth Exp $); +__RCSID($NetBSD: gpt.c,v 1.30 2014/09/28 08:14:51 jnemeth Exp $); #endif #include sys/param.h @@ -732,6 +732,7 @@ static struct { { cmd_restore, restore }, { cmd_set, set }, { cmd_show, show }, + { cmd_type, type }, { cmd_unset, unset }, { NULL, verify }, { NULL, NULL } @@ -744,7 +745,8 @@ usage(void) extern const char createmsg[], destroymsg[], labelmsg1[], labelmsg2[]; extern const char labelmsg3[], migratemsg[], recovermsg[], removemsg1[]; extern const char removemsg2[], resizemsg[], resizediskmsg[]; - extern const char restoremsg[], setmsg[], showmsg[], unsetmsg[]; + extern const char restoremsg[], setmsg[], showmsg[], typemsg1[]; + extern const char typemsg2[], typemsg3[], unsetmsg[]; fprintf(stderr, usage: %s %s\n @@ -765,6 +767,9 @@ usage(void) %s %s\n %s %s\n %s %s\n + %s %s\n + %s %s\n + %*s %s\n %s %s\n, getprogname(), addmsg1, getprogname(), addmsg2, @@ -784,6 +789,9 @@ usage(void) getprogname(), restoremsg, getprogname(), setmsg, getprogname(), showmsg, + getprogname(), typemsg1, + getprogname(), typemsg2, + (int)strlen(getprogname()), , typemsg3, getprogname(), unsetmsg); exit(1); } Index: src/sbin/gpt/gpt.h diff -u src/sbin/gpt/gpt.h:1.12 src/sbin/gpt/gpt.h:1.13 --- src/sbin/gpt/gpt.h:1.12 Tue Sep 23 07:47:54 2014 +++ src/sbin/gpt/gpt.h Sun Sep 28 08:14:51 2014 @@ -94,6 +94,7 @@ int cmd_resizedisk(int, char *[]); int cmd_restore(int, char *[]); int cmd_set(int, char *[]); int cmd_show(int, char *[]); +int cmd_type(int, char *[]); int cmd_unset(int, char *[]); #endif /* _GPT_H_ */ Added files: Index: src/sbin/gpt/type.c diff -u /dev/null src/sbin/gpt/type.c:1.1 --- /dev/null Sun Sep 28 08:14:51 2014 +++ src/sbin/gpt/type.c Sun Sep 28 08:14:51 2014 @@ -0,0 +1,227 @@ +/*- + * Copyright (c) 2004 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * +
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Sun Sep 28 11:20:23 UTC 2014 Modified Files: src/sys/dev/ic: mpt_netbsd.c Log Message: for BIOCDISK_NOVOL, set bd_disknovol=true for any disk not associated with a volume To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/ic/mpt_netbsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/mpt_netbsd.c diff -u src/sys/dev/ic/mpt_netbsd.c:1.29 src/sys/dev/ic/mpt_netbsd.c:1.30 --- src/sys/dev/ic/mpt_netbsd.c:1.29 Sat Sep 27 21:01:51 2014 +++ src/sys/dev/ic/mpt_netbsd.c Sun Sep 28 11:20:22 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mpt_netbsd.c,v 1.29 2014/09/27 21:01:51 jmcneill Exp $ */ +/* $NetBSD: mpt_netbsd.c,v 1.30 2014/09/28 11:20:22 jmcneill Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -77,7 +77,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mpt_netbsd.c,v 1.29 2014/09/27 21:01:51 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: mpt_netbsd.c,v 1.30 2014/09/28 11:20:22 jmcneill Exp $); #include bio.h @@ -1964,12 +1964,20 @@ mpt_bio_ioctl_disk_common(mpt_softc_t *m static int mpt_bio_ioctl_disk_novol(mpt_softc_t *mpt, struct bioc_disk *bd) { + fCONFIG_PAGE_IOC_2 *ioc2 = NULL; fCONFIG_PAGE_IOC_3 *ioc3 = NULL; - int address; + fCONFIG_PAGE_RAID_VOL_0 *rvol0 = NULL; + fCONFIG_PAGE_IOC_2_RAID_VOL *ioc2rvol; + int address, v, d; + ioc2 = mpt_get_cfg_page_ioc2(mpt); + if (ioc2 == NULL) + return EIO; ioc3 = mpt_get_cfg_page_ioc3(mpt); - if (ioc3 == NULL) + if (ioc3 == NULL) { + free(ioc2, M_DEVBUF); return EIO; + } if (bd-bd_diskid 0 || bd-bd_diskid = ioc3-NumPhysDisks) goto fail; @@ -1978,12 +1986,33 @@ mpt_bio_ioctl_disk_novol(mpt_softc_t *mp mpt_bio_ioctl_disk_common(mpt, bd, address); + bd-bd_disknovol = true; + for (v = 0; bd-bd_disknovol v ioc2-NumActiveVolumes; v++) { + ioc2rvol = ioc2-RaidVolume[v]; + address = ioc2rvol-VolumeID | (ioc2rvol-VolumeBus 8); + + rvol0 = mpt_get_cfg_page_raid_vol0(mpt, address); + if (rvol0 == NULL) + continue; + + for (d = 0; d rvol0-NumPhysDisks; d++) { + if (rvol0-PhysDisk[d].PhysDiskNum == + ioc3-PhysDisk[bd-bd_diskid].PhysDiskNum) { +bd-bd_disknovol = false; +break; + } + } + free(rvol0, M_DEVBUF); + } + free(ioc3, M_DEVBUF); + free(ioc2, M_DEVBUF); return 0; fail: if (ioc3) free(ioc3, M_DEVBUF); + if (ioc2) free(ioc2, M_DEVBUF); return EINVAL; }
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jmcneill Date: Sun Sep 28 11:27:01 UTC 2014 Modified Files: src/sys/dev/ic: mpt_netbsd.c Log Message: for BIOCDISK_NOVOL, when setting bd_disknovol=false, also set bv_volid To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/ic/mpt_netbsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/mpt_netbsd.c diff -u src/sys/dev/ic/mpt_netbsd.c:1.30 src/sys/dev/ic/mpt_netbsd.c:1.31 --- src/sys/dev/ic/mpt_netbsd.c:1.30 Sun Sep 28 11:20:22 2014 +++ src/sys/dev/ic/mpt_netbsd.c Sun Sep 28 11:27:00 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mpt_netbsd.c,v 1.30 2014/09/28 11:20:22 jmcneill Exp $ */ +/* $NetBSD: mpt_netbsd.c,v 1.31 2014/09/28 11:27:00 jmcneill Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -77,7 +77,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mpt_netbsd.c,v 1.30 2014/09/28 11:20:22 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: mpt_netbsd.c,v 1.31 2014/09/28 11:27:00 jmcneill Exp $); #include bio.h @@ -1999,6 +1999,7 @@ mpt_bio_ioctl_disk_novol(mpt_softc_t *mp if (rvol0-PhysDisk[d].PhysDiskNum == ioc3-PhysDisk[bd-bd_diskid].PhysDiskNum) { bd-bd_disknovol = false; +bd-bd_volid = v; break; } }
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: macallan Date: Sun Sep 28 12:57:22 UTC 2014 Modified Files: src/sys/arch/evbarm/rpi: vcprop.h Log Message: the RPi wiki had the values for VCPROPTAG_SET_CURSOR_INFO and VCPROPTAG_SET_CURSOR_STATE swapped - now they actually work thanks jmcneill@ for having the right idea To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/rpi/vcprop.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/rpi/vcprop.h diff -u src/sys/arch/evbarm/rpi/vcprop.h:1.11 src/sys/arch/evbarm/rpi/vcprop.h:1.12 --- src/sys/arch/evbarm/rpi/vcprop.h:1.11 Tue Sep 23 10:52:21 2014 +++ src/sys/arch/evbarm/rpi/vcprop.h Sun Sep 28 12:57:22 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vcprop.h,v 1.11 2014/09/23 10:52:21 macallan Exp $ */ +/* $NetBSD: vcprop.h,v 1.12 2014/09/28 12:57:22 macallan Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -93,8 +93,8 @@ struct vcprop_tag { #define VCPROPTAG_UNLOCKMEM 0x0003000e #define VCPROPTAG_RELEASEMEM 0x0003000f -#define VCPROPTAG_SET_CURSOR_INFO 0x8011 -#define VCPROPTAG_SET_CURSOR_STATE 0x8010 +#define VCPROPTAG_SET_CURSOR_INFO 0x8010 +#define VCPROPTAG_SET_CURSOR_STATE 0x8011 uint32_t vpt_len; uint32_t vpt_rcode;
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: macallan Date: Sun Sep 28 14:38:29 UTC 2014 Modified Files: src/sys/arch/evbarm/rpi: rpi_machdep.c vcprop.h Added Files: src/sys/arch/evbarm/rpi: vcprop_subr.c Log Message: add hardware cursor support To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/evbarm/rpi/rpi_machdep.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/rpi/vcprop.h cvs rdiff -u -r0 -r1.1 src/sys/arch/evbarm/rpi/vcprop_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/rpi/rpi_machdep.c diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.47 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.48 --- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.47 Fri Sep 12 15:29:30 2014 +++ src/sys/arch/evbarm/rpi/rpi_machdep.c Sun Sep 28 14:38:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rpi_machdep.c,v 1.47 2014/09/12 15:29:30 jmcneill Exp $ */ +/* $NetBSD: rpi_machdep.c,v 1.48 2014/09/28 14:38:29 macallan Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.47 2014/09/12 15:29:30 jmcneill Exp $); +__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.48 2014/09/28 14:38:29 macallan Exp $); #include opt_evbarm_boardtype.h #include opt_ddb.h @@ -71,6 +71,7 @@ __KERNEL_RCSID(0, $NetBSD: rpi_machdep. #include arm/broadcom/bcm2835var.h #include arm/broadcom/bcm2835_pmvar.h #include arm/broadcom/bcm2835_mbox.h +#include arm/broadcom/bcm_amba.h #include evbarm/rpi/vcio.h #include evbarm/rpi/vcpm.h @@ -376,16 +377,21 @@ static struct __aligned(16) { }, }; -int rpi_fb_set_video(int); -int rpi_video_on = WSDISPLAYIO_VIDEO_ON; - extern void bcmgenfb_set_console_dev(device_t dev); void bcmgenfb_set_ioctl(int(*)(void *, void *, u_long, void *, int, struct lwp *)); extern void bcmgenfb_ddb_trap_callback(int where); static int rpi_ioctl(void *, void *, u_long, void *, int, lwp_t *); +int rpi_video_on = WSDISPLAYIO_VIDEO_ON; +uint32_t hcursor = 0; +bus_addr_t pcursor = 0; +uint32_t *cmem = NULL; +int cursor_x = 0, cursor_y = 0, hot_x = 0, hot_y = 0, cursor_on = 0; +uint32_t cursor_cmap[4]; +uint8_t cursor_mask[8 * 64], cursor_bitmap[8 * 64]; #endif + static void rpi_bootparams(void) { @@ -731,8 +737,10 @@ rpi_fb_get_edid_mode(uint32_t *pwidth, u * - If console=fb is present, attach framebuffer to console. */ static bool -rpi_fb_init(prop_dictionary_t dict) +rpi_fb_init(prop_dictionary_t dict, void *aux) { + struct amba_attach_args *aaa = aux; + bus_space_handle_t hc; uint32_t width = 0, height = 0; uint32_t res; char *ptr; @@ -818,49 +826,105 @@ rpi_fb_init(prop_dictionary_t dict) prop_dictionary_set_uint32(dict, wsdisplay_type, integer); } + hcursor = rpi_alloc_mem(64 * 64 * 4, PAGE_SIZE, + MEM_FLAG_L1_NONALLOCATING | MEM_FLAG_HINT_PERMALOCK); + pcursor = rpi_lock_mem(hcursor); +#ifdef RPI_IOCTL_DEBUG + printf(hcursor: %08x\n, hcursor); + printf(pcursor: %08x\n, (uint32_t)pcursor); + printf(fb: %08x\n, (uint32_t)vb_setfb.vbt_allocbuf.address); +#endif + if (bus_space_map(aaa-aaa_iot, pcursor, 64 * 64 * 4, + BUS_SPACE_MAP_LINEAR|BUS_SPACE_MAP_PREFETCHABLE, hc) != 0) { + printf(couldn't map cursor memory\n); + } else { + int i, j, k; + + cmem = bus_space_vaddr(aaa-aaa_iot, hc); + k = 0; + for (j = 0; j 64; j++) { + for (i = 0; i 64; i++) { +cmem[i + k] = + ((i 8) ^ (j 8)) ? 0xa0ff : 0xa0ff; + } + k += 64; + } + cpu_dcache_wb_range(cmem, 64 * 64 * 4); + rpi_fb_initcursor(pcursor, 0, 0); + } +#ifdef RPI_IOCTL_DEBUG + rpi_fb_movecursor(600, 400, 1); +#else + rpi_fb_movecursor(cursor_x, cursor_y, cursor_on); +#endif return true; } -int -rpi_fb_set_video(int b) +static int +rpi_fb_do_cursor(struct wsdisplay_cursor *cur) { - int error; - uint32_t res; + int pos = 0; + int shape = 0; - /* - * might as well put it here since we need to re-init it every time - * and it's not like this is going to be called very often anyway - */ - struct __aligned(16) { - struct vcprop_buffer_hdr vb_hdr; - struct vcprop_tag_blankscreen vbt_blank; - struct vcprop_tag end; - } vb_setblank = - { - .vb_hdr = { - .vpb_len = sizeof(vb_setblank), - .vpb_rcode = VCPROP_PROCESS_REQUEST, - }, - .vbt_blank = { - .tag = { -.vpt_tag = VCPROPTAG_BLANK_SCREEN, -.vpt_len = VCPROPTAG_LEN(vb_setblank.vbt_blank), -.vpt_rcode = VCPROPTAG_REQUEST, - }, - .state = (b != 0) ? VCPROP_BLANK_OFF : VCPROP_BLANK_ON, - }, - .end = { - .vpt_tag = VCPROPTAG_NULL, - }, - }; + if (cur-which WSDISPLAY_CURSOR_DOCUR) { + if (cursor_on != cur-enable) { + cursor_on = cur-enable; + pos = 1; + } + } + if (cur-which WSDISPLAY_CURSOR_DOHOT) { - error = bcmmbox_request(BCMMBOX_CHANARM2VC, vb_setblank, - sizeof(vb_setblank), res); -#ifdef RPI_IOCTL_DEBUG - printf(%s: %d %d %d %08x %08x\n, __func__, b, -
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: macallan Date: Sun Sep 28 15:39:36 UTC 2014 Modified Files: src/sys/arch/evbarm/rpi: rpi_machdep.c Log Message: make global variables static also, make cursor test pattern red/green to highlight RGB vs. BGR To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/evbarm/rpi/rpi_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/rpi/rpi_machdep.c diff -u src/sys/arch/evbarm/rpi/rpi_machdep.c:1.48 src/sys/arch/evbarm/rpi/rpi_machdep.c:1.49 --- src/sys/arch/evbarm/rpi/rpi_machdep.c:1.48 Sun Sep 28 14:38:29 2014 +++ src/sys/arch/evbarm/rpi/rpi_machdep.c Sun Sep 28 15:39:36 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rpi_machdep.c,v 1.48 2014/09/28 14:38:29 macallan Exp $ */ +/* $NetBSD: rpi_machdep.c,v 1.49 2014/09/28 15:39:36 macallan Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.48 2014/09/28 14:38:29 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: rpi_machdep.c,v 1.49 2014/09/28 15:39:36 macallan Exp $); #include opt_evbarm_boardtype.h #include opt_ddb.h @@ -382,13 +382,13 @@ void bcmgenfb_set_ioctl(int(*)(void *, v extern void bcmgenfb_ddb_trap_callback(int where); static int rpi_ioctl(void *, void *, u_long, void *, int, lwp_t *); -int rpi_video_on = WSDISPLAYIO_VIDEO_ON; -uint32_t hcursor = 0; -bus_addr_t pcursor = 0; -uint32_t *cmem = NULL; -int cursor_x = 0, cursor_y = 0, hot_x = 0, hot_y = 0, cursor_on = 0; -uint32_t cursor_cmap[4]; -uint8_t cursor_mask[8 * 64], cursor_bitmap[8 * 64]; +static int rpi_video_on = WSDISPLAYIO_VIDEO_ON; +static uint32_t hcursor = 0; +static bus_addr_t pcursor = 0; +static uint32_t *cmem = NULL; +static int cursor_x = 0, cursor_y = 0, hot_x = 0, hot_y = 0, cursor_on = 0; +static uint32_t cursor_cmap[4]; +static uint8_t cursor_mask[8 * 64], cursor_bitmap[8 * 64]; #endif @@ -845,7 +845,7 @@ rpi_fb_init(prop_dictionary_t dict, void for (j = 0; j 64; j++) { for (i = 0; i 64; i++) { cmem[i + k] = - ((i 8) ^ (j 8)) ? 0xa0ff : 0xa0ff; + ((i 8) ^ (j 8)) ? 0xa0ff : 0xa000ff00; } k += 64; }
CVS commit: src/sys/arch/arm/samsung
Module Name:src Committed By: reinoud Date: Sun Sep 28 18:59:43 UTC 2014 Modified Files: src/sys/arch/arm/samsung: exynos_io.h Log Message: Remove never used usb locators To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/samsung/exynos_io.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/samsung/exynos_io.h diff -u src/sys/arch/arm/samsung/exynos_io.h:1.5 src/sys/arch/arm/samsung/exynos_io.h:1.6 --- src/sys/arch/arm/samsung/exynos_io.h:1.5 Fri Sep 5 08:01:05 2014 +++ src/sys/arch/arm/samsung/exynos_io.h Sun Sep 28 18:59:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exynos_io.h,v 1.5 2014/09/05 08:01:05 skrll Exp $ */ +/* $NetBSD: exynos_io.h,v 1.6 2014/09/28 18:59:43 reinoud Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -47,8 +47,6 @@ extern const struct exyo_locinfo exynos4 extern const struct exyo_locinfo exynos4_i2c_locinfo; extern const struct exyo_locinfo exynos5_locinfo; extern const struct exyo_locinfo exynos5_i2c_locinfo; -extern const struct exyo_usb_locinfo exynos4_usb_locinfo; -extern const struct exyo_usb_locinfo exynos5_usb_locinfo; /* XXXNH needed? */ #define NOPORT EXYOCF_PORT_DEFAULT
CVS commit: src/sbin/gpt
Module Name:src Committed By: jnemeth Date: Mon Sep 29 05:56:43 UTC 2014 Modified Files: src/sbin/gpt: biosboot.c gpt.8 label.c remove.c type.c Log Message: PR/47990 - Dr. Wolfgang Stukenbrock -- add -L label as selector option To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sbin/gpt/biosboot.c cvs rdiff -u -r1.31 -r1.32 src/sbin/gpt/gpt.8 cvs rdiff -u -r1.14 -r1.15 src/sbin/gpt/label.c cvs rdiff -u -r1.12 -r1.13 src/sbin/gpt/remove.c cvs rdiff -u -r1.1 -r1.2 src/sbin/gpt/type.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/gpt/biosboot.c diff -u src/sbin/gpt/biosboot.c:1.8 src/sbin/gpt/biosboot.c:1.9 --- src/sbin/gpt/biosboot.c:1.8 Fri Sep 26 05:34:15 2014 +++ src/sbin/gpt/biosboot.c Mon Sep 29 05:56:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: biosboot.c,v 1.8 2014/09/26 05:34:15 jnemeth Exp $ */ +/* $NetBSD: biosboot.c,v 1.9 2014/09/29 05:56:43 jnemeth Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include sys/cdefs.h #ifdef __RCSID -__RCSID($NetBSD: biosboot.c,v 1.8 2014/09/26 05:34:15 jnemeth Exp $); +__RCSID($NetBSD: biosboot.c,v 1.9 2014/09/29 05:56:43 jnemeth Exp $); #endif #include sys/stat.h @@ -65,8 +65,10 @@ static uint64_t size; static char *bootpath; static unsigned int entry; +static uint8_t *label; -const char biosbootmsg[] = biosboot [-c bootcode] [-i index] device ...; +const char biosbootmsg[] = biosboot [-c bootcode] [-i index] + [-L label] device ...; __dead static void usage_biosboot(void) @@ -196,8 +198,13 @@ biosboot(int fd) if (entry 0 m-map_index == entry) break; + if (label != NULL) + if (strcmp((char *)label, + (char *)utf16_to_utf8(ent-ent_name)) == 0) +break; + /* next, partition as could be specified by wedge */ - if (entry 1 size 0 + if (entry 1 label == NULL size 0 m-map_start == start m-map_size == (off_t)size) break; } @@ -252,6 +259,8 @@ biosboot(int fd) warnx(error: cannot update Protective MBR); return; } + + printf(partition %d marked as bootable\n, i + 1); } int @@ -263,7 +272,7 @@ cmd_biosboot(int argc, char *argv[]) char *dev, *p; int ch, fd; - while ((ch = getopt(argc, argv, c:i:)) != -1) { + while ((ch = getopt(argc, argv, c:i:L:)) != -1) { switch(ch) { case 'c': if (bootpath != NULL) @@ -278,6 +287,11 @@ cmd_biosboot(int argc, char *argv[]) if (*p != 0 || entry 1) usage_biosboot(); break; + case 'L': + if (label != NULL) +usage_biosboot(); + label = (uint8_t *)strdup(optarg); + break; default: usage_biosboot(); } Index: src/sbin/gpt/gpt.8 diff -u src/sbin/gpt/gpt.8:1.31 src/sbin/gpt/gpt.8:1.32 --- src/sbin/gpt/gpt.8:1.31 Sun Sep 28 08:14:51 2014 +++ src/sbin/gpt/gpt.8 Mon Sep 29 05:56:43 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: gpt.8,v 1.31 2014/09/28 08:14:51 jnemeth Exp $ +.\ $NetBSD: gpt.8,v 1.32 2014/09/29 05:56:43 jnemeth Exp $ .\ .\ Copyright (c) 2002 Marcel Moolenaar .\ All rights reserved. @@ -26,7 +26,7 @@ .\ .\ $FreeBSD: src/sbin/gpt/gpt.8,v 1.17 2006/06/22 22:22:32 marcel Exp $ .\ -.Dd September 28, 2014 +.Dd September 29, 2014 .Dt GPT 8 .Os .Sh NAME @@ -162,7 +162,8 @@ command. The format is a plist. It should not be modified. .\ biosboot -.It Nm Ic biosboot Oo Fl c Ar bootcode Oc Oo Fl i Ar index Oc Ar device ... +.It Nm Ic biosboot Oo Fl c Ar bootcode Oc Oo Fl i Ar index Oc \ +Oo Fl L Ar label Oc Ar device ... The .Ic biosboot command allows the user to configure the partition that contains the @@ -182,6 +183,11 @@ The option selects the partition that should contain the primary bootstrap code, as installed via .Xr installboot 8 . +The +.Fl L +option selects the partition by label. +If there are multiple partitions with the same label, it will use the +first one found. .\ create .It Nm Ic create Oo Fl fp Oc Ar device ... The @@ -216,7 +222,7 @@ to destroy the table in a way that it ca .\ label .It Nm Ic label Oo Fl a Oc Ao Fl f Ar file | Fl l Ar label Ac Ar device ... .It Nm Ic label Oo Fl b Ar blocknr Oc Oo Fl i Ar index Oc \ -Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc \ +Oo Fl L Ar label Oc Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc \ Ao Fl f Ar file | Fl l Ar label Ac Ar device ... The .Ic label @@ -237,6 +243,11 @@ The option selects the partition with the given partition number. .Pp The +.Fl L Ar label +option selects all partitions that have the given label. +This can cause multiple partitions to be relabeled. +.Pp +The .Fl s Ar sectors option selects all partitions that have the given size. This can cause multiple partitions to be labeled. @@ -320,7 +331,7 @@ It is very useful in case the primary la .\ remove .It Nm Ic remove Oo Fl a Oc Ar device ... .It Nm Ic remove Oo Fl b Ar blocknr Oc Oo Fl i Ar index Oc \ -Oo Fl s Ar sectors Oc Oo Fl t Ar type Oc Ar device ... +Oo Fl L
CVS commit: src/doc
Module Name:src Committed By: jnemeth Date: Mon Sep 29 05:58:48 UTC 2014 Modified Files: src/doc: CHANGES Log Message: note addition of type subcommand to gpt(8) To generate a diff of this commit: cvs rdiff -u -r1.1986 -r1.1987 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1986 src/doc/CHANGES:1.1987 --- src/doc/CHANGES:1.1986 Sat Sep 27 16:22:47 2014 +++ src/doc/CHANGES Mon Sep 29 05:58:48 2014 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1986 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1987 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -55,3 +55,5 @@ Changes from NetBSD 7.0 to NetBSD 8.0: [jnemeth 20140926] dhcpcd(8): Import dhcpcd-6.4.7. [roy 20140927] mpt(4): added bio(4) support. [jmcneill 20140927] + gpt(8): added type subcommand to modify partition type. + [jnemeth 20140927]