1 | --- io/hpmud/hpmud.c.orig 2011-07-06 19:14:07.000000000 +0200 |
---|
2 | +++ io/hpmud/hpmud.c 2011-07-06 19:16:49.000000000 +0200 |
---|
3 | @@ -34,7 +34,7 @@ |
---|
4 | /* |
---|
5 | * sysdump() originally came from http://sws.dett.de/mini/hexdump-c , steffen@dett.de . |
---|
6 | */ |
---|
7 | -void __attribute__ ((visibility ("hidden"))) sysdump(const void *data, int size) |
---|
8 | +void __attribute__ ((visibility ("hidden"))) sysdumpr(const void *data, int size) |
---|
9 | { |
---|
10 | /* Dump size bytes of *data. Output looks like: |
---|
11 | * [0000] 75 6E 6B 6E 6F 77 6E 20 30 FF 00 00 00 00 39 00 unknown 0.....9. |
---|
12 | @@ -305,6 +305,7 @@ |
---|
13 | { |
---|
14 | BUG("invalid uri %s\n", uri); |
---|
15 | *result = HPMUD_R_INVALID_URI; |
---|
16 | + index = 0; |
---|
17 | goto bugout; |
---|
18 | } |
---|
19 | msp->device[i].io_mode = mode; |
---|
20 | --- io/hpmud/hpmudi.h.orig 2010-12-19 22:15:45.000000000 +0100 |
---|
21 | +++ io/hpmud/hpmudi.h 2010-12-19 22:16:07.000000000 +0100 |
---|
22 | @@ -68,7 +68,7 @@ |
---|
23 | #ifdef HPMUD_DEBUG |
---|
24 | #define DBG(args...) syslog(LOG_INFO, __FILE__ " " STRINGIZE(__LINE__) ": " args) |
---|
25 | // #define DBG(args...) fprintf(stderr, __FILE__ " " STRINGIZE(__LINE__) ": " args) |
---|
26 | - #define DBG_DUMP(data, size) sysdump((data), (size)) |
---|
27 | + #define DBG_DUMP(data, size) sysdumpr((data), (size)) |
---|
28 | #define DBG_SZ(args...) syslog(LOG_INFO, args) |
---|
29 | #else |
---|
30 | #define DBG(args...) |
---|
31 | @@ -197,7 +197,7 @@ |
---|
32 | |
---|
33 | extern mud_session *msp __attribute__ ((visibility ("hidden"))); |
---|
34 | |
---|
35 | -void __attribute__ ((visibility ("hidden"))) sysdump(const void *data, int size); |
---|
36 | +void __attribute__ ((visibility ("hidden"))) sysdumpr(const void *data, int size); |
---|
37 | int __attribute__ ((visibility ("hidden"))) mm_device_lock(int fd, HPMUD_DEVICE index); |
---|
38 | int __attribute__ ((visibility ("hidden"))) mm_device_unlock(int fd, HPMUD_DEVICE index); |
---|
39 | int __attribute__ ((visibility ("hidden"))) mm_device_trylock(int fd, HPMUD_DEVICE index); |
---|