* grub-core/disk/cryptodisk.c (luks_script_get): Adapt to new procfs

API.
This commit is contained in:
Vladimir Serbinenko 2013-11-12 16:01:19 +01:00
parent b521bb816d
commit 431e57a797
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-11-12 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/cryptodisk.c (luks_script_get): Adapt to new procfs
API.
2013-11-12 Vladimir Serbinenko <phcoder@gmail.com> 2013-11-12 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/tests/legacy_password_test.c (vectors): Make static. * grub-core/tests/legacy_password_test.c (vectors): Make static.

View file

@ -1011,12 +1011,14 @@ hex (grub_uint8_t val)
/* Open a file named NAME and initialize FILE. */ /* Open a file named NAME and initialize FILE. */
static char * static char *
luks_script_get (void) luks_script_get (grub_size_t *sz)
{ {
grub_cryptodisk_t i; grub_cryptodisk_t i;
grub_size_t size = 0; grub_size_t size = 0;
char *ptr, *ret; char *ptr, *ret;
*sz = 0;
for (i = cryptodisk_list; i != NULL; i = i->next) for (i = cryptodisk_list; i != NULL; i = i->next)
if (grub_strcmp (i->modname, "luks") == 0) if (grub_strcmp (i->modname, "luks") == 0)
{ {
@ -1098,6 +1100,7 @@ luks_script_get (void)
*ptr++ = '\n'; *ptr++ = '\n';
} }
*ptr = '\0'; *ptr = '\0';
*sz = ptr - ret;
return ret; return ret;
} }