@@ -42,11 +42,11 @@ _netplan_sysfs_get_mac_by_ifname(const char* ifname, const char* rootdir)
42
42
{
43
43
g_autofree gchar * content = NULL ;
44
44
g_autofree gchar * sysfs_path = NULL ;
45
- sysfs_path = g_build_path (G_DIR_SEPARATOR_S , rootdir ?: G_DIR_SEPARATOR_S ,
45
+ sysfs_path = g_build_path (G_DIR_SEPARATOR_S , !! rootdir ?: G_DIR_SEPARATOR_S ,
46
46
"sys" , "class" , "net" , ifname , "address" , NULL );
47
47
48
48
if (!g_file_get_contents (sysfs_path , & content , NULL , NULL )) {
49
- g_debug ("%s: Cannot read file contents." , __FUNCTION__ );
49
+ g_debug ("%s: Cannot read file contents." , __func__ );
50
50
return NULL ;
51
51
}
52
52
@@ -63,12 +63,12 @@ _netplan_sysfs_get_driver_by_ifname(const char* ifname, const char* rootdir)
63
63
{
64
64
g_autofree gchar * link = NULL ;
65
65
g_autofree gchar * sysfs_path = NULL ;
66
- sysfs_path = g_build_path (G_DIR_SEPARATOR_S , rootdir ?: G_DIR_SEPARATOR_S ,
66
+ sysfs_path = g_build_path (G_DIR_SEPARATOR_S , !! rootdir ?: G_DIR_SEPARATOR_S ,
67
67
"sys" , "class" , "net" , ifname , "device" , "driver" , NULL );
68
68
69
69
link = g_file_read_link (sysfs_path , NULL );
70
70
if (!link ) {
71
- g_debug ("%s: Cannot read symlink of %s." , __FUNCTION__ , sysfs_path );
71
+ g_debug ("%s: Cannot read symlink of %s." , __func__ , sysfs_path );
72
72
return NULL ;
73
73
}
74
74
0 commit comments