Date: Wed, 4 Jul 2012 12:54:57 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r238097 - user/ae/bootcode/sys/boot/uboot/lib Message-ID: <201207041254.q64CsvH6011342@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Wed Jul 4 12:54:56 2012 New Revision: 238097 URL: http://svn.freebsd.org/changeset/base/238097 Log: Don't build storage.c if LOADER_NO_DISK_SUPPORT is defined. Also hide disk_xxx calls under ifdefs. Modified: user/ae/bootcode/sys/boot/uboot/lib/Makefile user/ae/bootcode/sys/boot/uboot/lib/devicename.c Modified: user/ae/bootcode/sys/boot/uboot/lib/Makefile ============================================================================== --- user/ae/bootcode/sys/boot/uboot/lib/Makefile Wed Jul 4 12:04:50 2012 (r238096) +++ user/ae/bootcode/sys/boot/uboot/lib/Makefile Wed Jul 4 12:54:56 2012 (r238097) @@ -7,7 +7,7 @@ INTERNALLIB= WARNS?= 2 SRCS= crc32.c console.c copy.c devicename.c elf_freebsd.c glue.c -SRCS+= module.c net.c reboot.c storage.c time.c +SRCS+= module.c net.c reboot.c time.c CFLAGS+= -ffreestanding -msoft-float @@ -19,6 +19,11 @@ CFLAGS+= -I${.CURDIR}/../../../../sys/co # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I. +.if !defined(LOADER_NO_DISK_SUPPORT) +SRCS+= storage.c +CFLAGS+= -DLOADER_DISK_SUPPORT +.endif + .ifdef(BOOT_DISK_DEBUG) # Make the disk code more talkative CFLAGS+= -DDISK_DEBUG Modified: user/ae/bootcode/sys/boot/uboot/lib/devicename.c ============================================================================== --- user/ae/bootcode/sys/boot/uboot/lib/devicename.c Wed Jul 4 12:04:50 2012 (r238096) +++ user/ae/bootcode/sys/boot/uboot/lib/devicename.c Wed Jul 4 12:54:56 2012 (r238097) @@ -113,11 +113,13 @@ uboot_parsedev(struct uboot_devdesc **de case DEVT_NONE: break; +#ifdef LOADER_DISK_SUPPORT case DEVT_DISK: err = disk_parsedev((struct disk_devdesc *)idev, np, path); if (err != 0) goto fail; break; +#endif case DEVT_NET: unit = 0; @@ -171,7 +173,9 @@ uboot_fmtdev(void *vdev) break; case DEVT_DISK: +#ifdef LOADER_DISK_SUPPORT return (disk_fmtdev(vdev)); +#endif case DEVT_NET: sprintf(buf, "%s%d:", dev->d_dev->dv_name, dev->d_unit);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207041254.q64CsvH6011342>