[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH hurd 7/9] boot: support ds_device_get_status with flavor DEV_
From: |
Samuel Thibault |
Subject: |
Re: [PATCH hurd 7/9] boot: support ds_device_get_status with flavor DEV_GET_RECORDS |
Date: |
Fri, 21 Nov 2014 01:40:26 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Fri 07 Nov 2014 17:32:00 +0100, a écrit :
> * boot/boot.c (ds_device_get_status): Support flavor DEV_GET_RECORDS.
Ack.
> ---
> boot/boot.c | 33 +++++++++++++++++++++------------
> 1 file changed, 21 insertions(+), 12 deletions(-)
>
> diff --git a/boot/boot.c b/boot/boot.c
> index a655107..d35ce50 100644
> --- a/boot/boot.c
> +++ b/boot/boot.c
> @@ -1150,18 +1150,27 @@ ds_device_get_status (device_t device,
> if (device == pseudo_console)
> return D_INVALID_OPERATION;
> else if (device == pseudo_root)
> - if (flavor == DEV_GET_SIZE)
> - if (*statuslen < DEV_GET_SIZE_COUNT)
> - return D_INVALID_SIZE;
> - else
> - {
> - status[DEV_GET_SIZE_DEVICE_SIZE] = root_store->size;
> - status[DEV_GET_SIZE_RECORD_SIZE] = root_store->block_size;
> - *statuslen = DEV_GET_SIZE_COUNT;
> - return D_SUCCESS;
> - }
> - else
> - return D_INVALID_OPERATION;
> + switch (flavor)
> + {
> + case DEV_GET_SIZE:
> + if (*statuslen < DEV_GET_SIZE_COUNT)
> + return D_INVALID_SIZE;
> + status[DEV_GET_SIZE_DEVICE_SIZE] = root_store->size;
> + status[DEV_GET_SIZE_RECORD_SIZE] = root_store->block_size;
> + *statuslen = DEV_GET_SIZE_COUNT;
> + return D_SUCCESS;
> +
> + case DEV_GET_RECORDS:
> + if (*statuslen < DEV_GET_RECORDS_COUNT)
> + return D_INVALID_SIZE;
> + status[DEV_GET_RECORDS_DEVICE_RECORDS] = root_store->blocks;
> + status[DEV_GET_RECORDS_RECORD_SIZE] = root_store->block_size;
> + *statuslen = DEV_GET_RECORDS_COUNT;
> + return D_SUCCESS;
> +
> + default:
> + return D_INVALID_OPERATION;
> + }
> else
> return D_NO_SUCH_DEVICE;
> }
> --
> 2.1.1
>
--
Samuel
> Subject: pb fvwm95-2 comment l'installer le compiler???
> Merci d'avance
je te conseille d'être un peu plus précis dans l'exposé de ton pb...
-+- EJ in guide du linuxien pervers :"Les modéros sont sympas !" -+-
- Re: [PATCH hurd 2/9] proc: gracefully handle failure to increase priority, (continued)
- [PATCH hurd 3/9] startup: also open `console' for reading, Justus Winter, 2014/11/07
- [PATCH hurd 4/9] boot: drop bootstrap compat code, Justus Winter, 2014/11/07
- [PATCH hurd 5/9] boot: remove unused function `boot_script_read_file', Justus Winter, 2014/11/07
- [PATCH hurd 6/9] boot: drop obsolete device procedures, Justus Winter, 2014/11/07
- [PATCH hurd 7/9] boot: support ds_device_get_status with flavor DEV_GET_RECORDS, Justus Winter, 2014/11/07
- Re: [PATCH hurd 7/9] boot: support ds_device_get_status with flavor DEV_GET_RECORDS,
Samuel Thibault <=
- [PATCH hurd 8/9] boot: implement pseudo-time device, Justus Winter, 2014/11/07
- [PATCH hurd 9/9] boot: improve the demuxer, Justus Winter, 2014/11/07
- Re: [PATCH hurd 1/9] Makeconf: handle the gnumach protocol, Samuel Thibault, 2014/11/20