Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Feb 2002 19:14:54 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Yar Tikhiy <yar@FreeBSD.ORG>
Cc:        "M. Warner Losh" <imp@village.org>, hackers@FreeBSD.ORG
Subject:   Re: Get disk device size?
Message-ID:  <3C609FAE.9B4B4EA1@mindspring.com>
References:  <20020205125557.A10266@comp.chem.msu.su> <20020205.093006.104650505.imp@village.org> <20020206022029.A95467@comp.chem.msu.su>

next in thread | previous in thread | raw e-mail | index | archive | help
Yar Tikhiy wrote:
> Thanks, the DIOCGDINFO ioctl is nearly what I was looking for.
> 
> However, there seems to be a number of problems (or my misunderstandings?)
> about it.  This ioctl can't be used against non-BSD slices; it
> fails on them with EINVAL due to code in kern/subr_diskslice.c.
> OTOH, invoking this ioctl on a partition (e.g. ad0s1a) will result
> in the parameters of the whole slice/disk (i.e. ad0s1.)  Isn't all
> that a bit inconsistent?  E.g. a filesystem layer doesn't need to
> distinguish between say ad0, ad0s1, and ad0s1a -- they're just
> disk devices for it.  Or did I miss any important point?

You missed the fact that there is not a uniform kernel API
for manipulating disk space.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C609FAE.9B4B4EA1>