]> git.baikalelectronics.ru Git - kernel.git/commit
efi_pstore: Add a format check for an existing variable name at erasing time
authorSeiji Aguchi <seiji.aguchi@hds.com>
Wed, 14 Nov 2012 20:29:21 +0000 (20:29 +0000)
committerTony Luck <tony.luck@intel.com>
Tue, 27 Nov 2012 00:08:37 +0000 (16:08 -0800)
commitd89e8fcebbb325d8faef2c588951e1afb6f1b94d
tree476e4615eb15c6a08d2511802fdcd35418a1896d
parenta321b591c33c78e7a9382cbc1a34090cfea5965b
efi_pstore: Add a format check for an existing variable name at erasing time

[Issue]

a format of variable name has been updated to type, id, count and ctime
to support holding multiple logs.

Format of current variable name
  dump-type0-1-2-12345678

  type:0
  id:1
  count:2
  ctime:12345678

On the other hand, if an old variable name before being updated
remains, users can't erase it via /dev/pstore.

Format of old variable name
  dump-type0-1-12345678

  type:0
  id:1
  ctime:12345678

[Solution]

This patch add a format check for the old variable name in a erase callback to make it erasable.

Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
Acked-by: Mike Waychison <mikew@google.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
drivers/firmware/efivars.c