Merge changes from sid up to 3.10-2
svn path=/dists/trunk/linux-tools/; revision=20464
This commit is contained in:
commit
2ac66fdb89
|
@ -14,7 +14,7 @@ print '#define GETOPT_OPTIONS "%s"' % options
|
|||
|
||||
print '#define GETOPT_CASE',
|
||||
for c in options:
|
||||
if c == ':':
|
||||
if c == ':' or c == 'T':
|
||||
continue
|
||||
print "case '%c':" % c,
|
||||
print
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
int main (int argc, char *argv[])
|
||||
{
|
||||
char const *data, *class;
|
||||
char *list_name = NULL;
|
||||
char *name = NULL;
|
||||
char prog[1024];
|
||||
unsigned char ei[EI_NIDENT];
|
||||
int opt;
|
||||
|
@ -21,17 +23,69 @@ int main (int argc, char *argv[])
|
|||
{
|
||||
GETOPT_CASE
|
||||
break;
|
||||
case 'T':
|
||||
list_name = optarg;
|
||||
break;
|
||||
default:
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
if (optind == argc)
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
if (!(file = fopen (argv[optind], "r")))
|
||||
if (optind != argc)
|
||||
{
|
||||
fprintf (stderr, "Can't open file\n");
|
||||
name = argv[optind];
|
||||
}
|
||||
else if (list_name)
|
||||
{
|
||||
size_t name_len;
|
||||
int is_stdin = strcmp (list_name, "-") == 0;
|
||||
|
||||
/* Read first line of list file */
|
||||
if (is_stdin)
|
||||
{
|
||||
file = stdin;
|
||||
setvbuf(stdin, NULL, _IONBF, 0); /* don't over-read */
|
||||
}
|
||||
else
|
||||
{
|
||||
file = fopen (list_name, "r");
|
||||
if (!file)
|
||||
{
|
||||
fprintf (stderr, "Can't open \"%s\"\n", list_name);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
if (getline (&name, &name_len, file) < 0)
|
||||
{
|
||||
fprintf (stderr, "Can't read \"%s\"\n", list_name);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
if (!is_stdin)
|
||||
fclose(file);
|
||||
|
||||
/* Remove new-line */
|
||||
name [strcspn (name, "\n")] = 0;
|
||||
|
||||
/* If this came from stdin, we need to add the first name to the
|
||||
* arguments, because the upstream modpost can't read it again.
|
||||
*/
|
||||
if (is_stdin)
|
||||
{
|
||||
char **new_argv = malloc (sizeof(*argv) * (argc + 2));
|
||||
memcpy(new_argv, argv, sizeof(*argv) * argc);
|
||||
new_argv [argc] = name;
|
||||
new_argv [argc + 1] = NULL;
|
||||
argv = new_argv;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
if (!(file = fopen (name, "r")))
|
||||
{
|
||||
fprintf (stderr, "Can't open \"%s\"\n", name);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
linux-tools (3.10-1~exp1) UNRELEASED; urgency=low
|
||||
linux-tools (3.10-2) unstable; urgency=low
|
||||
|
||||
* linux-kbuild: Fix use of getline() in modpost wrapper (Closes: #717195)
|
||||
|
||||
-- Ben Hutchings <ben@decadent.org.uk> Thu, 18 Jul 2013 04:02:11 +0100
|
||||
|
||||
linux-tools (3.10-1) unstable; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
|
@ -12,8 +18,10 @@ linux-tools (3.10-1~exp1) UNRELEASED; urgency=low
|
|||
* debian/rules.real: Remove support for pre-multiarch dpkg
|
||||
* Update policy version to 3.9.4
|
||||
- debian/rules: Implement build-arch and build-indep targets
|
||||
* linux-kbuild: Update modpost wrapper for 3.10
|
||||
- Implement the -T option
|
||||
|
||||
-- Chris Boot <debian@bootc.net> Mon, 01 Jul 2013 22:07:42 +0100
|
||||
-- Ben Hutchings <ben@decadent.org.uk> Tue, 16 Jul 2013 13:29:22 +0100
|
||||
|
||||
linux-tools (3.9.4-1) unstable; urgency=low
|
||||
|
||||
|
|
Loading…
Reference in New Issue