BLKSSZGET not defined in util-linux/fdisk.c ?

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Thu Jun 29 11:07:28 PDT 2006


Jean-Francois,
All,

On Thursday 29 June 2006 111, Jean-Philippe Francois wrote:
> trying to compile last snapshot I got :
> /usr/src/ARM2/userland/busybox_snapshot/util-linux/fdisk.c:3921: error:
> `BLKSSZGET' undeclared (first use in this function)

Works-For-Me (TM). What's your setup (kernel headers and C library most
importantly)?

> In 1.1.3, BLKSSZGET is defined in fdisk.c
> Attached is a -p1 patch that defines BLKSSZGET the way it is defined in
> e2fsprogs/getsectsize.c
> diff -ur busybox/util-linux/fdisk.c busybox_snapshot/util-linux/fdisk.c
> --- busybox/util-linux/fdisk.c  2006-06-29 09:21:11.000000000 +0200
> +++ busybox_snapshot/util-linux/fdisk.c 2006-06-29 10:59:16.894406478 +0200
> @@ -46,6 +46,9 @@
>  /*
>     fdisk.h
>  */
> +#if defined(__linux__) && defined(_IO) && !defined(BLKSSZGET)
> +#define BLKSSZGET  _IO(0x12,104)/* get block device sector size */
> +#endif
>
>  #define DEFAULT_SECTOR_SIZE     512
>  #define MAX_SECTOR_SIZE 2048

That's not the correct fix. We've already discussed this on-list, and the fix
shall go into platform.h. There's already such a fix in the archives (lemme
find the link...)

Here is the thread:
http://www.busybox.net/lists/busybox/2006-June/022105.html

and the last version of the patch is there (same thread):
http://www.busybox.net/lists/busybox/2006-June/022491.html

Well that was about BLKGETSIZE64. But nonetheless it shall _not_ go into fdisk,
but in platform.h : this is platform dependent code, that many applets would
benefit of, such as fdisk. Note that e2fsprogs shouldn't define it for
themselves either (discussin may be in the same thread).

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< °_° >==-- °---.----------------:  X  AGAINST      |  /e\  There is no  |
| web: ymorin.free.fr | SETI at home 3808 | / \ HTML MAIL    |  """  conspiracy.  |
°---------------------°----------------°------------------°--------------------°


More information about the busybox mailing list