Skip to content

Commit 5300224

Browse files
author
Trent Nelson
committed
Drop now unused sysfs_init() et. al
1 parent 80ccbfc commit 5300224

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

src/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ int main(int argc, char* argv[])
307307

308308
if (udisks2_init())
309309
{
310-
sysfs_init();
311310
sysfs_scan();
312311
output_fmt_init();
313312
fill_output();

src/sysfs_scan.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
#define SYSFS_PCI_BASE "/sys/bus/pci/devices"
1515

16-
static size_t de_size = 0;
17-
1816
typedef bool (*dir_selector_fn)(const char* d_name, const void** next_sel, size_t* n_next_sel);
1917

2018
static bool scsi_dev_dir_selector(const char* d_name, const void** next_sel, size_t* n_next_sel)
@@ -296,18 +294,6 @@ int select_dirs(const char* path, const dir_selector_fn* dsfs, size_t ndsfs)
296294
return rc;
297295
}
298296

299-
void
300-
sysfs_init(
301-
)
302-
{
303-
long name_max = pathconf(SYSFS_PCI_BASE, _PC_NAME_MAX);
304-
size_t de_base_len = offsetof(struct dirent, d_name);
305-
if (-1 == name_max)
306-
name_max = 255;
307-
308-
de_size = de_base_len + name_max + 1;
309-
}
310-
311297
int
312298
sysfs_scan(
313299
)

src/sysfs_scan.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
#ifndef SYSFS_SCAN_H__
33
#define SYSFS_SCAN_H__
44

5-
void
6-
sysfs_init(
7-
);
8-
95
int
106
sysfs_scan(
117
);

0 commit comments

Comments
 (0)