[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 27/64: boot: support ds_device_get_status with flavor DEV_GET_REC
From: |
Samuel Thibault |
Subject: |
[hurd] 27/64: boot: support ds_device_get_status with flavor DEV_GET_RECORDS |
Date: |
Wed, 10 Dec 2014 15:17:05 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit e4429ebed2924fd75b23248719a6e0ef4f8b53c3
Author: Justus Winter <address@hidden>
Date: Fri Nov 7 09:56:29 2014 +0100
boot: support ds_device_get_status with flavor DEV_GET_RECORDS
* boot/boot.c (ds_device_get_status): Support flavor DEV_GET_RECORDS.
---
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;
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 20/64: startup: bind the startup server to /servers/startup, (continued)
- [hurd] 20/64: startup: bind the startup server to /servers/startup, Samuel Thibault, 2014/12/10
- [hurd] 28/64: boot: implement pseudo-time device, Samuel Thibault, 2014/12/10
- [hurd] 47/64: exec: add payload-aware intrans functions, Samuel Thibault, 2014/12/10
- [hurd] 49/64: pfinet: make the demuxers payload-aware, Samuel Thibault, 2014/12/10
- [hurd] 50/64: pflocal: add payload-aware intrans functions, Samuel Thibault, 2014/12/10
- [hurd] 48/64: pfinet: add payload-aware intrans functions, Samuel Thibault, 2014/12/10
- [hurd] 51/64: proc: add payload-aware intrans functions, Samuel Thibault, 2014/12/10
- [hurd] 24/64: boot: drop bootstrap compat code, Samuel Thibault, 2014/12/10
- [hurd] 52/64: startup: disable default payload to port mapping, Samuel Thibault, 2014/12/10
- [hurd] 55/64: trans/ifsock: add a payload-aware intrans function, Samuel Thibault, 2014/12/10
- [hurd] 27/64: boot: support ds_device_get_status with flavor DEV_GET_RECORDS,
Samuel Thibault <=
- [hurd] 35/64: libshouldbeinlibc: move the reference counting primitives here, Samuel Thibault, 2014/12/10
- [hurd] 56/64: trans/password: add a payload-aware intrans function, Samuel Thibault, 2014/12/10
- [hurd] 36/64: Fix coding style, Samuel Thibault, 2014/12/10
- [hurd] 38/64: libports: add a payload-aware intrans function, Samuel Thibault, 2014/12/10
- [hurd] 58/64: trans/symlink: disable default payload to port mapping, Samuel Thibault, 2014/12/10
- [hurd] 34/64: Revert "random: fix a receiver lookup", Samuel Thibault, 2014/12/10
- [hurd] 61/64: Fix mode of nodes created with mkfile, Samuel Thibault, 2014/12/10
- [hurd] 62/64: include: don't install nonexistent refcount.h, Samuel Thibault, 2014/12/10
- [hurd] 37/64: libports: add `ports_lookup_payload' and `ports_payload_get_name', Samuel Thibault, 2014/12/10
- [hurd] 44/64: auth: add a payload-aware intrans function, Samuel Thibault, 2014/12/10