Skip to content

Commit

Permalink
WIP: debugging ubus call add_dynamic_device
Browse files Browse the repository at this point in the history
  • Loading branch information
G10h4ck committed Oct 10, 2024
1 parent dd5c707 commit f4f5a16
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,8 @@ device_create(const char *name, struct device_type *type,
dev->config_pending = false;
}

device_check_state(dev);
int checkret = device_check_state(dev);
D(DEVICE, "%s device_check_state return %d\n", __func__, checkret);

return dev;
}
Expand Down
2 changes: 1 addition & 1 deletion netifd.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ enum {
DEBUG_WIRELESS = 3,
};

#ifdef DEBUG
#if 1 // def DEBUG
#define DPRINTF(format, ...) fprintf(stderr, "%s(%d): " format, __func__, __LINE__, ## __VA_ARGS__)
#define D(level, format, ...) do { \
netifd_udebug_printf("[" #level "] %s(%d): " format, __func__, __LINE__, ## __VA_ARGS__); \
Expand Down
2 changes: 2 additions & 0 deletions ubus.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ netifd_add_dynamic_device(
struct ubus_request_data */*req*/, const char */*method*/,
struct blob_attr *msg )
{
D(DEVICE, "%s\n", __func__);

struct blob_attr *tb[__DI_DEV_MAX];
struct device *device;
struct device_type *type;
Expand Down
2 changes: 2 additions & 0 deletions vlandev.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ static struct device *
vlandev_create(const char *name, struct device_type *devtype,
struct blob_attr *attr)
{
D(DEVICE, "%s\n", __func__);

struct vlandev_device *mvdev;
struct device *dev = NULL;

Expand Down

0 comments on commit f4f5a16

Please sign in to comment.