[PATCH] miscutils: add ubimkvol ubirmvol and ubirsvol

Denys Vlasenko vda.linux at googlemail.com
Thu Feb 3 03:25:08 UTC 2011


On Wednesday 02 February 2011 05:23, Reuben Dowle wrote:
> Cut down version of ubimkvol, ubirmvol and ubirsvol. Does not support deleting or resizing named volumes (must use volume id), and does not support specifying size as anything other than a byte count.
> 
> Signed-off-by: Reuben Dowle <reuben.dowle at navico.com>
> ---
> miscutils/ubi_attach_detach.c |  130 +++++++++++++++++++++++++++++++++++++----
>  1 files changed, 119 insertions(+), 11 deletions(-)
> 
> diff --git a/miscutils/ubi_attach_detach.c b/miscutils/ubi_attach_detach.c
> index aa8a517..881ee69 100644
> --- a/miscutils/ubi_attach_detach.c
> +++ b/miscutils/ubi_attach_detach.c
> @@ -3,11 +3,17 @@
>   * Licensed under GPLv2, see file LICENSE in this source tree.
>   */
>  
> -//applet:IF_UBIATTACH(APPLET_ODDNAME(ubiattach, ubi_attach_detach, BB_DIR_USR_SBIN, BB_SUID_DROP, ubiattach))
> -//applet:IF_UBIDETACH(APPLET_ODDNAME(ubidetach, ubi_attach_detach, BB_DIR_USR_SBIN, BB_SUID_DROP, ubidetach))
> +//applet:IF_UBIATTACH(APPLET_ODDNAME(ubiattach, ubi_tools, BB_DIR_USR_SBIN, BB_SUID_DROP, ubiattach))
> +//applet:IF_UBIDETACH(APPLET_ODDNAME(ubidetach, ubi_tools, BB_DIR_USR_SBIN, BB_SUID_DROP, ubidetach))
> +//applet:IF_UBIMKVOL(APPLET_ODDNAME(ubimkvol, ubi_tools, BB_DIR_USR_SBIN, BB_SUID_DROP, ubimkvol))
> +//applet:IF_UBIRMVOL(APPLET_ODDNAME(ubirmvol, ubi_tools, BB_DIR_USR_SBIN, BB_SUID_DROP, ubirmvol))
> +//applet:IF_UBIRSVOL(APPLET_ODDNAME(ubirsvol, ubi_tools, BB_DIR_USR_SBIN, BB_SUID_DROP, ubirsvol))
>  
>  //kbuild:lib-$(CONFIG_UBIATTACH)   += ubi_attach_detach.o
>  //kbuild:lib-$(CONFIG_UBIDETACH)   += ubi_attach_detach.o
> +//kbuild:lib-$(CONFIG_UBIMKVOL)   += ubi_attach_detach.o
> +//kbuild:lib-$(CONFIG_UBIRMVOL)   += ubi_attach_detach.o
> +//kbuild:lib-$(CONFIG_UBIRSVOL)   += ubi_attach_detach.o
>  
>  //config:config UBIATTACH
>  //config:	bool "ubiattach"
> @@ -22,6 +28,24 @@
>  //config:	depends on PLATFORM_LINUX
>  //config:	help
>  //config:	  Detach MTD device from an UBI device.
> +//config:config UBIMKVOL
> +//config:	bool "ubimkvol"
> +//config:	default n
> +//config:	depends on PLATFORM_LINUX
> +//config:	help
> +//config:	  Create a UBI volume.
> +//config:config UBIRMVOL
> +//config:	bool "ubirmvol"
> +//config:	default n
> +//config:	depends on PLATFORM_LINUX
> +//config:	help
> +//config:	  Delete a UBI volume.
> +//config:config UBIRSVOL
> +//config:	bool "ubirsvol"
> +//config:	default n
> +//config:	depends on PLATFORM_LINUX
> +//config:	help
> +//config:	  Resize a UBI volume.

All applets should be y by default, unless they need an extremely new
kernel and/or libc headers to compile. In this case, a comment
should explain why default is n (for example, which version of kernel
headers is needed).

-- 
vda


More information about the busybox mailing list