exmaples: some nxstyle fixes for module/sotest/thttpd
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
This commit is contained in:
parent
0c60624276
commit
79e544f032
@ -122,7 +122,7 @@
|
||||
* Private data
|
||||
****************************************************************************/
|
||||
|
||||
static const char g_write_string[] = "Hi there, installed driver\n";
|
||||
static const char g_write_string[] = "Hi there installed driver\n";
|
||||
|
||||
/****************************************************************************
|
||||
* Symbols from Auto-Generated Code
|
||||
@ -196,7 +196,9 @@ int main(int argc, FAR char *argv[])
|
||||
NSECTORS(romfs_img_len), SECTORSIZE);
|
||||
if (ret < 0)
|
||||
{
|
||||
/* This will happen naturally if we registered the ROM disk previously. */
|
||||
/* This will happen naturally if we registered the ROM disk
|
||||
* previously.
|
||||
*/
|
||||
|
||||
if (ret != -EEXIST)
|
||||
{
|
||||
|
@ -145,7 +145,9 @@ int main(int argc, FAR char *argv[])
|
||||
NSECTORS(romfs_img_len), SECTORSIZE);
|
||||
if (ret < 0)
|
||||
{
|
||||
/* This will happen naturally if we registered the ROM disk previously. */
|
||||
/* This will happen naturally if we registered the ROM disk
|
||||
* previously.
|
||||
*/
|
||||
|
||||
if (ret != -EEXIST)
|
||||
{
|
||||
@ -257,7 +259,9 @@ int main(int argc, FAR char *argv[])
|
||||
testfunc(msg);
|
||||
|
||||
#if CONFIG_MODLIB_MAXDEPEND > 0
|
||||
/* This should fail because the second shared library depends on the first. */
|
||||
/* This should fail because the second shared library depends on
|
||||
* the first.
|
||||
*/
|
||||
|
||||
ret = dlclose(handle1);
|
||||
if (ret == 0)
|
||||
|
@ -110,13 +110,13 @@
|
||||
/* Ethernet specific configuration */
|
||||
|
||||
#ifdef CONFIG_NET_ETHERNET
|
||||
/* Use the standard Ethernet device name */
|
||||
/* Use the standard Ethernet device name */
|
||||
|
||||
# define NET_DEVNAME "eth0"
|
||||
|
||||
#else
|
||||
|
||||
/* No Ethernet -> No MAC address operations */
|
||||
/* No Ethernet -> No MAC address operations */
|
||||
|
||||
# undef CONFIG_EXAMPLES_THTTPD_NOMAC
|
||||
#endif
|
||||
@ -125,7 +125,7 @@
|
||||
|
||||
#ifdef CONFIG_NET_SLIP
|
||||
|
||||
/* TTY device to use */
|
||||
/* TTY device to use */
|
||||
|
||||
# ifndef CONFIG_NET_SLIPTTY
|
||||
# define CONFIG_NET_SLIPTTY "/dev/ttyS1"
|
||||
@ -216,7 +216,7 @@ int main(int argc, FAR char *argv[])
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Many embedded network interfaces must have a software assigned MAC */
|
||||
/* Many embedded network interfaces must have a software assigned MAC */
|
||||
|
||||
#ifdef CONFIG_EXAMPLES_THTTPD_NOMAC
|
||||
printf("Assigning MAC\n");
|
||||
@ -256,7 +256,8 @@ int main(int argc, FAR char *argv[])
|
||||
|
||||
printf("Registering romdisk\n");
|
||||
|
||||
ret = romdisk_register(0, (uint8_t*)romfs_img, NSECTORS(romfs_img_len), SECTORSIZE);
|
||||
ret = romdisk_register(0, (uint8_t *)romfs_img, NSECTORS(romfs_img_len),
|
||||
SECTORSIZE);
|
||||
if (ret < 0)
|
||||
{
|
||||
printf("ERROR: romdisk_register failed: %d\n", ret);
|
||||
@ -283,22 +284,26 @@ int main(int argc, FAR char *argv[])
|
||||
ret = mount(NULL, BINFS_MOUNTPT, "binfs", MS_RDONLY, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
printf("ERROR: mount(NULL,%s,binfs) failed: %d\n", BINFS_MOUNTPT, errno);
|
||||
printf("ERROR: mount(NULL,%s,binfs) failed: %d\n",
|
||||
BINFS_MOUNTPT, errno);
|
||||
}
|
||||
|
||||
/* Now create and mount the union file system */
|
||||
|
||||
printf("Creating UNIONFS filesystem at %s\n", UNIONFS_MOUNTPT);
|
||||
|
||||
ret = unionfs_mount(ROMFS_MOUNTPT, ROMFS_PREFIX, BINFS_MOUNTPT, BINFS_PREFIX,
|
||||
UNIONFS_MOUNTPT);
|
||||
ret = unionfs_mount(ROMFS_MOUNTPT, ROMFS_PREFIX, BINFS_MOUNTPT,
|
||||
BINFS_PREFIX, UNIONFS_MOUNTPT);
|
||||
if (ret < 0)
|
||||
{
|
||||
printf("ERROR: Failed to create the union file system at %s: %d\n", UNIONFS_MOUNTPT, ret);
|
||||
printf("ERROR: Failed to create the union file system at %s: %d\n",
|
||||
UNIONFS_MOUNTPT, ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Start THTTPD. At present, symbol table info is passed via global variables */
|
||||
/* Start THTTPD. At present, symbol table info is passed via
|
||||
* global variables.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_THTTPD_NXFLAT
|
||||
g_thttpdsymtab = g_thttpd_exports;
|
||||
|
Loading…
Reference in New Issue
Block a user