+2008-06-04 Guillem Jover <guillem@debian.org>
+
+ * src/main.c (setpipe): Fix the setting of more than one pipef.
+
2008-06-04 Guillem Jover <guillem@debian.org>
* src/select.c (setselections): Free varbuf variables.
* Remove duplicate program name from dpkg-trigger badusage output.
* Trim trailing slash and slash dot from 'dpkg -S' arguments when those
are path names, but not on patterns. Closes: #129577
+ * Fix the support for passing more than one --status-fd option to dpkg.
+ Until now only the last one was being used.
[ Raphael Hertzog ]
* Enhance dpkg-shlibdeps's error message when a library can't be found to
}
static void setpipe(const struct cmdinfo *cip, const char *value) {
- static struct pipef **lastpipe;
+ struct pipef **pipe_head = cip->parg;
+ struct pipef *pipe_new;
unsigned long v;
char *ep;
if (*ep || v > INT_MAX)
badusage(_("invalid integer for --%s: `%.250s'"),cip->olong,value);
- lastpipe= cip->parg;
- if (*lastpipe) {
- (*lastpipe)->next= nfmalloc(sizeof(struct pipef));
- *lastpipe= (*lastpipe)->next;
- } else {
- *lastpipe= nfmalloc(sizeof(struct pipef));
- }
- (*lastpipe)->fd= v;
- (*lastpipe)->next= NULL;
+ pipe_new = nfmalloc(sizeof(struct pipef));
+ pipe_new->fd = v;
+ pipe_new->next = *pipe_head;
+ *pipe_head = pipe_new;
}
static void setforce(const struct cmdinfo *cip, const char *value) {