err(1, "can't get current directory");
snprintf(fullpathinput, MAXPATHLEN, "%s/%s", wd, inputdev);
fullpathinput[MAXPATHLEN - 1] = '\0';
err(1, "can't get current directory");
snprintf(fullpathinput, MAXPATHLEN, "%s/%s", wd, inputdev);
fullpathinput[MAXPATHLEN - 1] = '\0';