Hi, i'm writing a C code which would schedule some backup in linux. It takes in a device as one of its arguments.
I want to check whether the device is valid for storing the backup(or if that device even exists or not) before i proceed to do anything.
I'm just wondering if there is like a function that i can call to do this? or a function that would give me a list of device where i can compare it, or something similar. (say if the given input is /dev/opp, i want to call a function that can check whether its a valid device or a functino that can give me a list of valid device and i can check over it.)
Thanks.
I want to check whether the device is valid for storing the backup(or if that device even exists or not) before i proceed to do anything.
I'm just wondering if there is like a function that i can call to do this? or a function that would give me a list of device where i can compare it, or something similar. (say if the given input is /dev/opp, i want to call a function that can check whether its a valid device or a functino that can give me a list of valid device and i can check over it.)
Thanks.