From: Matt Domsch <Matt_Domsch@dell.com>
To: akpm@osdl.org, Matt Tolentino <metolent@snoqualmie.dp.intel.com>
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 1/3] efivars driver update and move
Date: Mon, 26 Apr 2004 13:57:58 -0500 [thread overview]
Message-ID: <20040426185758.GA32755@lists.us.dell.com> (raw)
In-Reply-To: <20040424034109.GA15589@lists.us.dell.com>
[-- Attachment #1: Type: text/plain, Size: 2763 bytes --]
Patch below fixes three small bugs in efivars.c as posted by Matt
Tolentino last week and included in the latest -mm. Aside from this
small patch, I'm quite pleased with Matt T's work, thanks!
* dummy() used for reading write-only sysfs files should return
-ENODEV to indicate failure, not 0.
* efivar_create() should return the number of bytes written on
success, not zero.
* efivar_delete() should return the number of bytes written on
success, not zero.
Compiled, tested with efibootmgr-0.5.0-test3. The anomolies I noted
late Friday night are resolved by this kernel patch - efibootmgr was
actually testing the values returned by writes.
--
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com
--- linux-2.6.5.orig/drivers/firmware/efivars.c 2004-04-24 06:58:08.000000000 -0400
+++ linux-2.6.5/drivers/firmware/efivars.c 2004-04-27 03:48:33.037318467 -0400
@@ -1,7 +1,7 @@
/*
* EFI Variables - efivars.c
*
- * Copyright (C) 2001,2003 Dell <Matt_Domsch@dell.com>
+ * Copyright (C) 2001,2003,2004 Dell <Matt_Domsch@dell.com>
* Copyright (C) 2004 Intel Corporation <matthew.e.tolentino@intel.com>
*
* This code takes all variables accessible from EFI runtime and
@@ -23,6 +23,9 @@
*
* Changelog:
*
+ * 26 Apr 2004 - Matt Domsch <Matt_Domsch@dell.com>
+ * minor bug fixes
+ *
* 21 Apr 2004 - Matt Tolentino <matthew.e.tolentino@intel.com)
* converted driver to export variable information via sysfs
* and moved to drivers/firmware directory
@@ -78,7 +81,7 @@ MODULE_AUTHOR("Matt Domsch <Matt_Domsch@
MODULE_DESCRIPTION("sysfs interface to EFI Variables");
MODULE_LICENSE("GPL");
-#define EFIVARS_VERSION "0.07 2003-Aug-29"
+#define EFIVARS_VERSION "0.07 2004-Apr-26"
/*
* efivars_lock protects two things:
@@ -408,7 +411,7 @@ static struct kobj_type ktype_efivar = {
static ssize_t
dummy(struct subsystem *sub, char *buf)
{
- return 0;
+ return -ENODEV;
}
static inline void
@@ -472,7 +475,10 @@ efivar_create(struct subsystem *sub, con
/* Create the entry in sysfs. Locking is not required here */
status = efivar_create_sysfs_entry(utf8_strsize(new_var->VariableName,
1024), new_var->VariableName, &new_var->VendorGuid);
- return status;
+ if (status) {
+ printk(KERN_WARNING "efivars: variable created, but sysfs entry wasn't.\n");
+ }
+ return count;
}
static ssize_t
@@ -532,7 +538,7 @@ efivar_delete(struct subsystem *sub, con
efivar_unregister(search_efivar);
/* It's dead Jim.... */
- return status;
+ return count;
}
static VAR_SUBSYS_ATTR(new_var, 0200, dummy, efivar_create);
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-04-26 19:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-22 17:32 [patch 1/3] efivars driver update and move Matt Tolentino
2004-04-22 16:46 ` Bjorn Helgaas
2004-04-23 22:29 ` Matt Domsch
2004-04-24 3:41 ` Matt Domsch
2004-04-26 18:57 ` Matt Domsch [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-04-30 1:55 Matt Tolentino
2004-04-26 21:15 Matt Tolentino
2004-04-22 17:14 Tolentino, Matthew E
2004-04-22 17:20 ` Bjorn Helgaas
2004-04-29 19:50 ` Alex Williamson
2004-04-29 21:19 ` Matt Domsch
2004-04-29 22:08 ` Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040426185758.GA32755@lists.us.dell.com \
--to=matt_domsch@dell.com \
--cc=akpm@osdl.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=metolent@snoqualmie.dp.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox