int ubi_rsvol(libubi_t desc, const char *node, int vol_id, long long bytes);
/**
- * ubi_node_type - test UBI node type.
+ * ubi_probe_node - test UBI node.
* @desc: UBI library descriptor
* @node: the node to test
*
* this is not an UBI node or if an error occurred (the latter is indicated by
* a non-zero errno).
*/
-int ubi_node_type(libubi_t desc, const char *node);
+int ubi_probe_node(libubi_t desc, const char *node);
/**
* ubi_get_dev_info - get UBI device information.
return ret;
}
-int ubi_node_type(libubi_t desc, const char *node)
+int ubi_probe_node(libubi_t desc, const char *node)
{
struct stat st;
struct ubi_info info;
if (!libubi)
return sys_errmsg("cannot open libubi");
- err = ubi_node_type(libubi, args.node);
+ err = ubi_probe_node(libubi, args.node);
if (err == 2) {
errmsg("\"%s\" is an UBI volume node, not an UBI device node",
args.node);
{
int err;
- err = ubi_node_type(libubi, node);
+ err = ubi_probe_node(libubi, node);
if (err == -1) {
if (errno)
return errmsg("unrecognized device node \"%s\"", node);
if (!libubi)
return sys_errmsg("cannot open libubi");
- err = ubi_node_type(libubi, node);
+ err = ubi_probe_node(libubi, node);
if (err == 2) {
errmsg("\"%s\" is an UBI volume node, not an UBI device node",
node);
if (libubi == NULL)
return sys_errmsg("cannot open libubi");
- err = ubi_node_type(libubi, args.node);
+ err = ubi_probe_node(libubi, args.node);
if (err == 2) {
errmsg("\"%s\" is an UBI volume node, not an UBI device node",
args.node);
goto out_libubi;
}
- err = ubi_node_type(libubi, args.node);
+ err = ubi_probe_node(libubi, args.node);
if (err == 1) {
errmsg("\"%s\" is an UBI device node, not an UBI volume node",
args.node);