See patch
* Stefan Reinauer stefan.reinauer@coreboot.org [110329 21:55]:
Don't print the error
sh: dmidecode: not found
if dmidecode is not there.
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org
Index: dmi.c
--- dmi.c (revision 1282) +++ dmi.c (working copy) @@ -75,7 +75,7 @@ };
#define DMI_COMMAND_LEN_MAX 260 -static const char *dmidecode_command = "dmidecode"; +static const char *dmidecode_command = "dmidecode 2>/dev/null";
static char *dmistrings[ARRAY_SIZE(dmidecode_names)];
Any opinions on a half line patch? :)
Am Dienstag, den 05.04.2011, 23:48 +0200 schrieb Stefan Reinauer:
-static const char *dmidecode_command = "dmidecode"; +static const char *dmidecode_command = "dmidecode 2>/dev/null";
Any opinions on a half line patch? :)
Not every OS has a unix command interpreter. This will break on DOS. Most likely fine if DOS is detected per ifdef.
Regards, Michael Karcher
* Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de [110406 09:53]:
Am Dienstag, den 05.04.2011, 23:48 +0200 schrieb Stefan Reinauer:
-static const char *dmidecode_command = "dmidecode"; +static const char *dmidecode_command = "dmidecode 2>/dev/null";
Any opinions on a half line patch? :)
Not every OS has a unix command interpreter. This will break on DOS. Most likely fine if DOS is detected per ifdef.
Ok, how about this one?
Am Donnerstag, den 07.04.2011, 18:40 +0200 schrieb Stefan Reinauer:
- Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de
Not every OS has a unix command interpreter. This will break on DOS. Most likely fine if DOS is detected per ifdef.
Ok, how about this one?
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org
Acked-by: Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de
+#if defined (__DJGPP__) || defined (_WIN32)
That might be overly conservative, but I am fine with out. while command.com does not support 2>something, I am quite sure cmd.exe does.
Regards, Michael Karcher
This should work on DOS; the only change is from "/dev/null" to "NUL": C:\HOTFIXES-ng>command Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-2001.
C:\HOTFIX~2>echo foo foo
C:\HOTFIX~2>echo foo>NUL
C:\HOTFIX~2>dir NUL
Directory of \.
File Not Found
[granted this is on XP; but it should work anywhere]
---- Original message ----
Date: Thu, 07 Apr 2011 19:16:04 +0200 From: flashrom-bounces+owen=mann.org@flashrom.org (on behalf of Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de) Subject: Re: [flashrom] [PATCH] don't print dmidecode shell error To: Stefan Reinauer stefan.reinauer@coreboot.org Cc: flashrom@flashrom.org
Am Donnerstag, den 07.04.2011, 18:40 +0200 schrieb Stefan Reinauer:
- Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de
Not every OS has a unix command interpreter. This will break on DOS. Most likely fine if DOS is detected per ifdef.
Ok, how about this one?
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org
Acked-by: Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de
+#if defined (__DJGPP__) || defined (_WIN32)
That might be overly conservative, but I am fine with out. while command.com does not support 2>something, I am quite sure cmd.exe does.
Regards, Michael Karcher
flashrom mailing list flashrom@flashrom.org http://www.flashrom.org/mailman/listinfo/flashrom
---- Original message ----
---- Original message ----
Date: Thu, 07 Apr 2011 19:16:04 +0200 From: flashrom-bounces+owen=mann.org@flashrom.org (on behalf of Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de) Subject: Re: [flashrom] [PATCH] don't print dmidecode shell error To: Stefan Reinauer stefan.reinauer@coreboot.org Cc: flashrom@flashrom.org
Am Donnerstag, den 07.04.2011, 18:40 +0200 schrieb Stefan Reinauer:
- Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de
Not every OS has a unix command interpreter. This will break on DOS. Most likely fine if DOS is detected per ifdef.
Ok, how about this one?
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org
Acked-by: Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de
+#if defined (__DJGPP__) || defined (_WIN32)
That might be overly conservative, but I am fine with out. while command.com does not support 2>something, I am quite sure cmd.exe does.
Regards, Michael Karcher
flashrom mailing list flashrom@flashrom.org http://www.flashrom.org/mailman/listinfo/flashrom
Date: Thu, 7 Apr 2011 13:28:16 -0400 (EDT) From: flashrom-bounces@flashrom.org (on behalf of Owen Mann owen-javanet@rcn.com) Subject: Re: [flashrom] [PATCH] don't print dmidecode shell error To: flashrom@flashrom.org
This should work on DOS; the only change is from "/dev/null" to "NUL": C:\HOTFIXES-ng>command Microsoft(R) Windows DOS (C)Copyright Microsoft Corp 1990-2001.
C:\HOTFIX~2>echo foo foo
C:\HOTFIX~2>echo foo>NUL
C:\HOTFIX~2>dir NUL
Directory of \.
File Not Found
[granted this is on XP; but it should work anywhere]
flashrom mailing list flashrom@flashrom.org http://www.flashrom.org/mailman/listinfo/flashrom
Sorry, I missed the "2" (and sorry for the top-post). This works in command.com (in XP) too: C:>cat foo 'CAT' is not recognized as an internal or external command, operable program or batch file. C:>cat foo 2>NUL
On Thu, 07 Apr 2011 19:16:04 +0200 Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de wrote:
Am Donnerstag, den 07.04.2011, 18:40 +0200 schrieb Stefan Reinauer:
- Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de
Not every OS has a unix command interpreter. This will break on DOS. Most likely fine if DOS is detected per ifdef.
Ok, how about this one?
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org
Acked-by: Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de
+#if defined (__DJGPP__) || defined (_WIN32)
That might be overly conservative, but I am fine with out. while command.com does not support 2>something, I am quite sure cmd.exe does.
stepan told me to commit this, but i hesitate. i want to integrate dos/win support first.
i would drop the __DJGPP__ flag there because /dev/null is supported by it: http://www.delorie.com/djgpp/doc/eli-m17n99.html#Unix%20devices additionally i would use 2>NUL for win32. for xp there is official documentation. a friend of mine also tried it on win2k so i would say it is fairly safe to use it?
Op 27-6-2011 14:44, Stefan Tauner schreef:
stepan told me to commit this, but i hesitate. i want to integrate dos/win support first.
i would drop the __DJGPP__ flag there because /dev/null is supported by it: http://www.delorie.com/djgpp/doc/eli-m17n99.html#Unix%20devices additionally i would use 2>NUL for win32. for xp there is official documentation. a friend of mine also tried it on win2k so i would say it is fairly safe to use it?
It would be kind to be able to detect a missing DMIDECOD.EXE (DOS) or DMIDECODE.EXE (LFN platforms, likely thus only Windows/ReactOS) only once, instead of ending up with 6 times the line "bad command or filename" (sent to stdout only, unable to redirect to textfile). Searching current directory, flashrom's directory as well as entire path, should do, I guess.
On Mon, 27 Jun 2011 14:54:49 +0200 Bernd Blaauw bblaauw@home.nl wrote:
Op 27-6-2011 14:44, Stefan Tauner schreef:
stepan told me to commit this, but i hesitate. i want to integrate dos/win support first.
i would drop the __DJGPP__ flag there because /dev/null is supported by it: http://www.delorie.com/djgpp/doc/eli-m17n99.html#Unix%20devices additionally i would use 2>NUL for win32. for xp there is official documentation. a friend of mine also tried it on win2k so i would say it is fairly safe to use it?
It would be kind to be able to detect a missing DMIDECOD.EXE (DOS) or DMIDECODE.EXE (LFN platforms, likely thus only Windows/ReactOS) only once, instead of ending up with 6 times the line "bad command or filename" (sent to stdout only, unable to redirect to textfile).
does it with the previously attached patch still?
Searching current directory, flashrom's directory as well as entire path, should do, I guess.
patches are welcome ;)
Op 27-6-2011 15:29, Stefan Tauner schreef:
does it with the previously attached patch still?
Can't say, I'm a simple Windows/Dos user, thus leeching on Idwer's DOS compilation. Someday I'll start with Linux and compiling, likely the day I purchase that Asrock E350M board for Coreboot attempting to create a 'full' opensource machine.
Searching current directory, flashrom's directory as well as entire path, should do, I guess.
patches are welcome ;)
Thanks for the offer :)