more transparent and robust (since I figured out how to get minor number
from code for ls)
return -1;
}
- asprintf( &setup->cal_save_file_path, "%s/%s_0x%lx",
+ asprintf( &setup->cal_save_file_path, "%s/%s_comedi%li",
save_dir, comedi_get_board_name( dev ),
- ( unsigned long ) file_stats.st_ino );
+ ( unsigned long ) minor( file_stats.st_rdev ) );
}
file = fopen( setup->cal_save_file_path, "w" );
if( file == NULL )
return -1;
}
- snprintf( file_path, sizeof( file_path ), "/etc/comedi/calibrations/%s_0x%lx",
+ snprintf( file_path, sizeof( file_path ), "/etc/comedi/calibrations/%s_comedi%li",
comedi_get_board_name( dev ),
- ( unsigned long ) file_stats.st_ino );
+ ( unsigned long ) minor( file_stats.st_rdev ) );
}
cal_file = fopen( file_path, "r" );