if( strcmp(argv[1], "autoconf") == 0 ) {
DoAutoConfig(argv[2]);
+ return 0;
}
+ PrintUsage(argv[0]);
+
return 0;
}
dp = open(IPSTACK_ROOT, OPENFLAG_READ);
ret = ioctl(dp, 4, Device);
+ printf("AddInterface: ret = 0x%x = %i\n", ret, ret);
close(dp);
if( ret < 0 ) {
\r
//sprintfv\r
/**\r
- \fn EXPORT void vsnprintf(char *buf, const char *format, va_list args)\r
- \brief Prints a formatted string to a buffer\r
- \param buf Pointer - Destination Buffer\r
- \param format String - Format String\r
- \param args VarArgs List - Arguments\r
-*/\r
+ * \fn EXPORT void vsnprintf(char *buf, const char *format, va_list args)\r
+ * \brief Prints a formatted string to a buffer\r
+ * \param buf Pointer - Destination Buffer\r
+ * \param format String - Format String\r
+ * \param args VarArgs List - Arguments\r
+ */\r
EXPORT int vsnprintf(char *buf, size_t __maxlen, const char *format, va_list args)\r
{\r
char tmp[65];\r
/**\r
* \fn static void itoa(char *buf, uint64_t num, int base, int minLength, char pad, int bSigned)\r
* \brief Convert an integer into a character string\r
+ * \param buf Destination Buffer\r
+ * \param num Number to convert\r
+ * \param base Base-n number output\r
+ * \param minLength Minimum length of output\r
+ * \param pad Padding used to ensure minLength\r
+ * \param bSigned Signed number output?\r
*/\r
EXPORT void itoa(char *buf, uint64_t num, size_t base, int minLength, char pad, int bSigned)\r
{\r
} else\r
bSigned = 0;\r
\r
+ // Encode into reversed string\r
while(num > base-1) {\r
tmpBuf[pos++] = cUCDIGITS[ num % base ];\r
num = (uint64_t) num / (uint64_t)base; // Shift {number} right 1 digit\r