Last change
on this file since 2689 was 821, checked in by Bruno Cornec, 18 years ago |
Addition of busybox 1.2.1 as a mindi-busybox new package
This should avoid delivering binary files in mindi not built there (Fedora and Debian are quite serious about that)
|
File size:
571 bytes
|
Line | |
---|
1 | /*
|
---|
2 | Copyright (C) 2002 Tim Riker <Tim@Rikers.org>
|
---|
3 | everyone seems to claim it someplace. ;-)
|
---|
4 | */
|
---|
5 |
|
---|
6 | #include <errno.h>
|
---|
7 |
|
---|
8 | #include "libbb.h"
|
---|
9 |
|
---|
10 | int query_module(const char *name, int which, void *buf, size_t bufsize, size_t *ret);
|
---|
11 |
|
---|
12 | int my_query_module(const char *name, int which, void **buf,
|
---|
13 | size_t *bufsize, size_t *ret)
|
---|
14 | {
|
---|
15 | int my_ret;
|
---|
16 |
|
---|
17 | my_ret = query_module(name, which, *buf, *bufsize, ret);
|
---|
18 |
|
---|
19 | if (my_ret == -1 && errno == ENOSPC) {
|
---|
20 | *buf = xrealloc(*buf, *ret);
|
---|
21 | *bufsize = *ret;
|
---|
22 |
|
---|
23 | my_ret = query_module(name, which, *buf, *bufsize, ret);
|
---|
24 | }
|
---|
25 |
|
---|
26 | return my_ret;
|
---|
27 | }
|
---|
28 |
|
---|
29 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.