Last change
on this file since 279 was 279, checked in by coas-nagasima, 7 years ago |
ファイルを追加、更新。
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id
-
Property svn:mime-type
set to
text/x-csrc
|
File size:
834 bytes
|
Rev | Line | |
---|
[279] | 1 | #include "libbb.h"
|
---|
| 2 |
|
---|
| 3 | const char *applet_name;
|
---|
| 4 |
|
---|
| 5 | void bb_show_usage(void) { xfunc_die(); }
|
---|
| 6 | void FAST_FUNC kill_myself_with_sig(int sig){ abort(); }
|
---|
| 7 | void BUG_sizeof(void) { abort(); }
|
---|
| 8 |
|
---|
| 9 | static unsigned long long ret_ERANGE(void)
|
---|
| 10 | {
|
---|
| 11 | errno = ERANGE; /* this ain't as small as it looks (on glibc) */
|
---|
| 12 | return ULLONG_MAX;
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | static unsigned long long handle_errors(unsigned long long v, char **endp)
|
---|
| 16 | {
|
---|
| 17 | char next_ch = **endp;
|
---|
| 18 |
|
---|
| 19 | /* errno is already set to ERANGE by strtoXXX if value overflowed */
|
---|
| 20 | if (next_ch) {
|
---|
| 21 | /* "1234abcg" or out-of-range? */
|
---|
| 22 | if (isalnum(next_ch) || errno)
|
---|
| 23 | return ret_ERANGE();
|
---|
| 24 | /* good number, just suspicious terminator */
|
---|
| 25 | errno = EINVAL;
|
---|
| 26 | }
|
---|
| 27 | return v;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | char* FAST_FUNC uid2uname_utoa(uid_t uid)
|
---|
| 31 | {
|
---|
| 32 | errno = ENOSYS;
|
---|
| 33 | return NULL;
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | char* FAST_FUNC gid2group_utoa(gid_t gid)
|
---|
| 37 | {
|
---|
| 38 | errno = ENOSYS;
|
---|
| 39 | return NULL;
|
---|
| 40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.