head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.2 pkgsrc-2013Q2-base:1.2 pkgsrc-2013Q1:1.1.0.20 pkgsrc-2013Q1-base:1.1 pkgsrc-2012Q4:1.1.0.18 pkgsrc-2012Q4-base:1.1 pkgsrc-2012Q3:1.1.0.16 pkgsrc-2012Q3-base:1.1 pkgsrc-2012Q2:1.1.0.14 pkgsrc-2012Q2-base:1.1 pkgsrc-2012Q1:1.1.0.12 pkgsrc-2012Q1-base:1.1 pkgsrc-2011Q4:1.1.0.10 pkgsrc-2011Q4-base:1.1 pkgsrc-2011Q3:1.1.0.8 pkgsrc-2011Q3-base:1.1 pkgsrc-2011Q2:1.1.0.6 pkgsrc-2011Q2-base:1.1 pkgsrc-2011Q1:1.1.0.4 pkgsrc-2011Q1-base:1.1 pkgsrc-2010Q4:1.1.0.2 pkgsrc-2010Q4-base:1.1; locks; strict; comment @# @; 1.2 date 2013.06.17.05.37.22; author dholland; state dead; branches; next 1.1; commitid xvAP9fhaMF6oEVTw; 1.1 date 2011.01.10.06.12.16; author obache; state Exp; branches; next ; desc @@ 1.2 log @Merge two patches that patch the same file. @ text @$NetBSD: patch-ai,v 1.1 2011/01/10 06:12:16 obache Exp $ * DragonFly BSD's partinfo is not the standard BSD partinfo. --- blkdev.c.orig 2011-01-09 11:55:42.000000000 +0000 +++ blkdev.c @@@@ -44,10 +44,15 @@@@ # endif #endif -#ifdef HAVE_SYS_DISKLABEL_H +#ifdef __DragonFly__ +# include +# define BSD_BLKDEV +#else +#ifdef HAVE_SYS_DISKLABEL_H) # include # define BSD_BLKDEV #endif +#endif #ifndef LINUX_BLKDEV # ifndef BSD_BLKDEV @@@@ -181,14 +186,20 @@@@ public int destroy_blkdev(struct file_s options.sectors = tmp; #endif -#ifdef BSD_BLKDEV +#if defined(BSD_BLKDEV) +# if defined(__DragonFly__) + options.sectors = pinfo.media_blocks; +# else options.sectors = pinfo.part->p_size; +# endif #endif } if (options.sector_size == 0) { -#ifdef BSD_BLKDEV +#if defined(__DragonFly__) + options.sector_size = pinfo.media_blocks; +#elif defined(BSD_BLKDEV) options.sector_size = pinfo.disklab->d_secsize; #else options.sector_size = SECTOR_SIZE; @ 1.1 log @Add an patch for DragonFly, based on PR#44348 by Tony Young. @ text @d1 1 a1 1 $NetBSD$ @