NVME_DPKG_VERSION=1~`lsb_release -sc`
-OBJS := nvme-print.o nvme-lightnvm.o nvme-models.o plugin.o nvme-filters.o
+OBJS := print.o lightnvm.o models.o plugin.o filters.o
UTIL_OBJS := util/argconfig.o util/suffix.o util/json.o util/parser.o
verify-no-dep: nvme.c nvme.h $(OBJS) NVME-VERSION-FILE
$(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) $< -o $@ $(OBJS) $(LDFLAGS)
-nvme.o: nvme.c nvme.h nvme-print.h util/argconfig.h util/suffix.h nvme-lightnvm.h fabrics.h
+nvme.o: nvme.c nvme.h print.h util/argconfig.h util/suffix.h lightnvm.h fabrics.h
$(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) $(INC) -c $< $(LDFLAGS)
-%.o: %.c %.h nvme.h nvme-print.h util/argconfig.h
+%.o: %.c %.h nvme.h print.h util/argconfig.h
$(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) $(INC) -o $@ -c $< $(LDFLAGS)
-%.o: %.c nvme.h nvme-print.h util/argconfig.h
+%.o: %.c nvme.h print.h util/argconfig.h
$(QUIET_CC)$(CC) $(CPPFLAGS) $(CFLAGS) $(INC) -o $@ -c $< $(LDFLAGS)
doc: $(NVME)
+++ /dev/null
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "nvme.h"
-
-/* global, used for controller specific namespace filter */
-int current_index;
-
-int scan_namespace_filter(const struct dirent *d)
-{
- int i, n;
-
- if (d->d_name[0] == '.')
- return 0;
-
- if (strstr(d->d_name, "nvme"))
- if (sscanf(d->d_name, "nvme%dn%d", &i, &n) == 2)
- return 1;
- return 0;
-}
-
-int scan_ctrl_paths_filter(const struct dirent *d)
-{
- int id, cntlid, nsid;
-
- if (d->d_name[0] == '.')
- return 0;
-
- if (strstr(d->d_name, "nvme")) {
- if (sscanf(d->d_name, "nvme%dc%dn%d", &id, &cntlid, &nsid) == 3)
- return 1;
- if (sscanf(d->d_name, "nvme%dn%d", &id, &nsid) == 2)
- return 1;
- }
-
- return 0;
-}
-
-int scan_ctrls_filter(const struct dirent *d)
-{
- int id, nsid;
-
- if (d->d_name[0] == '.')
- return 0;
-
- if (strstr(d->d_name, "nvme")) {
- if (sscanf(d->d_name, "nvme%dn%d", &id, &nsid) == 2)
- return 0;
- if (sscanf(d->d_name, "nvme%dn", &id) == 1)
- return 1;
- return 0;
- }
-
- return 0;
-}
-
-int scan_subsys_filter(const struct dirent *d)
-{
- int id;
-
- if (d->d_name[0] == '.')
- return 0;
-
- if (strstr(d->d_name, "nvme-subsys")) {
- if (sscanf(d->d_name, "nvme-subsys%d", &id) != 1)
- return 0;
- return 1;
- }
-
- return 0;
-}
-
-int scan_dev_filter(const struct dirent *d)
-{
- int ctrl, ns, part;
-
- if (d->d_name[0] == '.')
- return 0;
-
- if (strstr(d->d_name, "nvme")) {
- if (sscanf(d->d_name, "nvme%dn%dp%d", &ctrl, &ns, &part) == 3)
- return 0;
- if (sscanf(d->d_name, "nvme%dn%d", &ctrl, &ns) == 2)
- return ctrl == current_index;
- }
- return 0;
-}