fHow to fetch hard drive details (serial number, manufacturer) programmatically QNX linux. Can I read it directly from filesystem ? or what are the other way of fetching hard disk details ?
Tried following:
if((fd = open (argv[1], O_RDONLY)) == -1) {
fprintf(stderr, "Error with open() on %s. Make sure it exists.\n", argv[1]);
perror (open );
exit(EXIT_FAILURE);
}
error = devctl(fd, DCMD_CAM_DEV_SERIAL_NUMBER, buf, len, NULL);
As a result i am getting only: 2GB NANDrive 300003
How to fetch manufacturer and other info like type/model/path on filesystem etc.