Re: New command to check NT's hibernation state

2013-11-04 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 04.11.2013 14:13, Andrey Borzenkov wrote: > В Mon, 04 Nov 2013 01:48:51 +0100 > Vladimir 'φ-coder/phcoder' Serbinenko пишет: > >> Going through e-mail archives found this one, looks like it got >> forgotten. Fixed problems with it and simplified greatly and committed. > > Is command name a ty

Re: New command to check NT's hibernation state

2013-11-04 Thread Andrey Borzenkov
В Mon, 04 Nov 2013 01:48:51 +0100 Vladimir 'φ-coder/phcoder' Serbinenko пишет: > Going through e-mail archives found this one, looks like it got > forgotten. Fixed problems with it and simplified greatly and committed. Is command name a typo? cmd = grub_register_command ("check_nt_hibrerfil",

Re: New command to check NT's hibernation state

2013-11-03 Thread Peter Lustig
Thanks for the update. I'm glad to hear it made the cut. On Sun, Nov 3, 2013 at 7:49 PM, Vladimir 'φ-coder/phcoder' Serbinenko < phco...@gmail.com> wrote: > > > > Original Message -------- > Subject: Re: New command to check NT's hibernatio

Re: New command to check NT's hibernation state

2013-11-03 Thread Vladimir 'φ-coder/phcoder' Serbinenko
ecmp ("hibr", hibr_file_magic, magic_size)) >>>> grub_error (GRUB_ERR_NONE, "true"); >>>> else >>>> grub_error (GRUB_ERR_TEST_FAILURE, "false"); >>>> >>>> exit: >>>

Re: New command to check NT's hibernation state

2013-01-28 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 23.12.2011 05:32, Peter Lustig wrote: > On 12/22/2011 13:10, Vladimir 'phcoder' Serbinenko wrote: >> On 18.12.2011 04:16, Peter Lustig wrote: >>> > /* Return SUCCESS if magic indicates file is active; else >>> return FAILURE */ >>> > if (!grub_strncasecmp ("hibr", hibr_file_magic, mag

Re: New command to check NT's hibernation state

2012-08-11 Thread Peter Lustig
On 12/22/2011 11:32 PM, Peter Lustig wrote: On 12/22/2011 13:10, Vladimir 'phcoder' Serbinenko wrote: On 18.12.2011 04:16, Peter Lustig wrote: > /* Return SUCCESS if magic indicates file is active; else return FAILURE */ > if (!grub_strncasecmp ("hibr", hibr_file_magic, magic_size))

Re: New command to check NT's hibernation state

2011-12-22 Thread Peter Lustig
On 12/22/2011 13:10, Vladimir 'phcoder' Serbinenko wrote: On 18.12.2011 04:16, Peter Lustig wrote: > /* Return SUCCESS if magic indicates file is active; else return FAILURE */ > if (!grub_strncasecmp ("hibr", hibr_file_magic, magic_size)) What's the reason to use strncasecmp? Does t

Re: New command to check NT's hibernation state

2011-12-22 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 18.12.2011 04:16, Peter Lustig wrote: /* Return SUCCESS if magic indicates file is active; else return FAILURE */ if (!grub_strncasecmp ("hibr", hibr_file_magic, magic_size)) What's the reason to use strncasecmp? Does the case changes? Usually memcmp is the right way to check the signat

Re: New command to check NT's hibernation state

2011-12-17 Thread Peter Lustig
ptions); } GRUB_MOD_FINI (nthibr) { grub_unregister_extcmd (cmd); } ~Peter Lustig -- next part -- An HTML attachment was scrubbed... URL:<http://lists.gnu.org/archive/html/grub-devel/attachments/20111217/71127c00/attachment.html> ------ next part --

Re: New command to check NT's hibernation state

2011-12-17 Thread Vladimir 'φ-coder/phcoder' Serbinenko
/* Try to open 'hiberfil.sys' */ hibr_file = grub_file_open (hibr_file_path); if (!hibr_file) { if (grub_errno == GRUB_ERR_FILE_NOT_FOUND) grub_error (GRUB_ERR_FILE_NOT_FOUND, N_("'hiberfil.sys' not found")); This overriding is unnecessary. FS code already provide

Re: New command to check NT's hibernation state

2011-12-16 Thread Peter Lustig
On 16.12.2011 10:30, Vladimir 'phcoder' Serbinenko wrote: /* nthibr.c - tests whether an MS Windows system partition is hibernated */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2007,2008,2009,2011 Free Software Foundation, Inc. * * GRUB is free software: you can redistri

Re: New command to check NT's hibernation state

2011-12-16 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 10.12.2011 07:03, Peter Lustig wrote: /* nthibr.c - tests whether an MS Windows system partition is hibernated */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2007,2008,2009,2011 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or mod

Re: New command to check NT's hibernation state

2011-12-16 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 10.12.2011 07:03, Peter Lustig wrote: I've followed all your recommendations (as far as possible). Here's the code again. The empty options are still there. Your arguments for having it aren't command-specific so it's a wrong to put such workarounds here. Also please user command and not ex

Re: New command to check NT's hibernation state

2011-12-09 Thread Peter Lustig
On 12/3/2011 11:41 AM, Vladimir Serbinenko wrote: /* nthibr.c - tests whether an MS Windows system partition is hibernated */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2007,2008,2009,2011 Free Software Foundation, Inc. * * GRUB is free software: you can redistribut

Re: New command to check NT's hibernation state

2011-12-03 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 03.12.2011 05:57, Peter Lustig wrote: /* nthibr.c - tests whether an MS Windows system partition is hibernated */ /* * GRUB -- GRand Unified Bootloader * Copyright (C) 2007,2008,2009,2011 Free Software Foundation, Inc. * * GRUB is free software: you can redistribute it and/or mod

Re: New command to check NT's hibernation state

2011-12-02 Thread Peter Lustig
On 02.12.2011 07:05, Vladimir Serbinenko wrote: P.S. Do you know if there are any plans in the future to implement write operations for filesystems? (I noticed raw disk writing is currently supported.) If not, is the reason due to the technical challenges (e.g. NTFS only had read-only access

Re: New command to check NT's hibernation state

2011-12-01 Thread Vladimir 'φ-coder/phcoder' Serbinenko
Hello. On 02.12.2011 06:16, Peter Lustig wrote: Thanks for this. However the coding style isn't according to our standards. Could you adjust to the standard? I recommend looking at other code and reading GNU Coding Standard. E.g. we don't use {0} initialiser, return value of commands, C++ comme

Re: Re: New command to check NT's hibernation state

2011-12-01 Thread Peter Lustig
Thanks for this. However the coding style isn't according to our standards. Could you adjust to the standard? I recommend looking at other code and reading GNU Coding Standard. E.g. we don't use {0} initialiser, return value of commands, C++ comments or M$-$tyle variables. Sorry about that.

Re: New command to check NT's hibernation state

2011-11-28 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 28.11.2011 02:03, Vladimir 'φ-coder/phcoder' Serbinenko wrote: M$-$tyle variables. Jordan Uggla pointed out that this was inappropriate to bash Microsoft. I'd like to apologize for it. I was very tired and just wanted to show the appreciation of the patch and point out what needs to be fixed

Re: New command to check NT's hibernation state

2011-11-27 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 28.11.2011 00:49, Peter Lustig wrote: Hello all, Hello I would like to contribute a small module I wrote to read the header of MS Window's "hiberfil.sys" and determine whether it is in use (i.e. Windows has been suspended to disk). What is the procedure for donating code? Would I need

New command to check NT's hibernation state

2011-11-27 Thread Peter Lustig
Hello all, I would like to contribute a small module I wrote to read the header of MS Window's "hiberfil.sys" and determine whether it is in use (i.e. Windows has been suspended to disk). What is the procedure for donating code? Would I need commit rights to the repository, or would someon