OSDN Git Service

Exclude the padded NULL when comparing the file size
authorGary Ching-Pang Lin <glin@suse.com>
Wed, 24 Jun 2015 09:51:44 +0000 (17:51 +0800)
committerPeter Jones <pjones@redhat.com>
Wed, 24 Jun 2015 13:59:27 +0000 (09:59 -0400)
commiteaaedefb82e88077f35f230994b9325e09550c8e
treeb60d9886510463650024edb8ed63f6af1c5c1937
parent2539222b3b58b14529e960848284a58aecf631ba
Exclude the padded NULL when comparing the file size

In vars_del_variable(), this "if" statement always failed because
read_file() returned the actual file size +1.

if (rc < 0 || (buf_size != sizeof(efi_kernel_variable_64_t) &&
               buf_size != sizeof(efi_kernel_variable_32_t)))

Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
src/vars.c