if(!udevadm_path)
{
+ struct stat st;
udevadm_path = "/bin/udevadm";
- if(access(udevadm_path, X_OK)<0)
+ if(stat(udevadm_path, &st)<0 || !(st.st_mode&0111))
{
udevadm_path = "/sbin/udevadm";
- if(access(udevadm_path, X_OK)<0)
+ if(stat(udevadm_path, &st)<0 || !(st.st_mode&0111))
{
udevadm_path = NULL;
perror("Unable to find udevadm");
char **nodes = NULL;
Device *devices = NULL;
int n_devices = 0;
- char **mounted = NULL;
char **fstab = NULL;
int i;
{
if(verbosity>=2)
printf(" No properties\n");
+ free(nodes[i]);
continue;
}
}
free(nodes);
- free_string_array(mounted);
+ free_string_array(fstab);
if(devices)
{