Accepting request 44084 from home:elvigia:branches:Base:System
Copy from home:elvigia:branches:Base:System/aaa_base via accept of submit request 44084 revision 2. Request was accepted with message: Reviewed ok OBS-URL: https://build.opensuse.org/request/show/44084 OBS-URL: https://build.opensuse.org/package/show/Base:System/aaa_base?expand=0&rev=130
This commit is contained in:
parent
d8630b2e94
commit
bb0d07e7ac
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 27 15:34:59 UTC 2010 - cristian.rodriguez@opensuse.org
|
||||
|
||||
- get_kernel_version : use O_CLOEXEC everywhere
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 16 17:22:27 CEST 2010 - werner@suse.de
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
@ -47,7 +48,7 @@ main (int argc, char *argv[])
|
||||
/* check if file exist and is compressed */
|
||||
{
|
||||
unsigned char buf [2];
|
||||
int fd = open (argv[1], O_RDONLY);
|
||||
int fd = open (argv[1], O_RDONLY | O_CLOEXEC);
|
||||
if (fd == -1)
|
||||
{
|
||||
fprintf (stderr, "Cannot open kernel image \"%s\"\n", argv[1]);
|
||||
@ -64,7 +65,7 @@ main (int argc, char *argv[])
|
||||
if (buf [0] == 037 && (buf [1] == 0213 || buf [1] == 0236))
|
||||
{
|
||||
snprintf (command, sizeof (command), "/bin/gzip -dc %s 2>/dev/null", argv[1]);
|
||||
fp = popen (command, "r");
|
||||
fp = popen (command, "re");
|
||||
if (fp == NULL)
|
||||
{
|
||||
fprintf (stderr, "%s: faild\n", command);
|
||||
@ -73,7 +74,7 @@ main (int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
fp = fopen (argv[1],"r");
|
||||
fp = fopen (argv[1],"re");
|
||||
}
|
||||
close (fd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user