[Stgt-devel] [patch] return proper error code from check_val functions
Jeff Moyer
jmoyer
Thu Jun 26 16:02:42 CEST 2008
Hi,
Here is a simple patch to actually return the error code (if any) from
the check_val functions. Build-tested, but that's all.
Cheers,
Jeff
diff --git a/usr/iscsi/param.c b/usr/iscsi/param.c
index 76236d1..0c3e3f7 100644
--- a/usr/iscsi/param.c
+++ b/usr/iscsi/param.c
@@ -115,7 +115,7 @@ static int minimum_check_val(struct iscsi_key *key, unsigned int *val)
err = -EINVAL;
}
- return 0;
+ return err;
}
static int min_or_zero_check_val(struct iscsi_key *key, unsigned int *val)
@@ -127,7 +127,7 @@ static int min_or_zero_check_val(struct iscsi_key *key, unsigned int *val)
err = -EINVAL;
}
- return 0;
+ return err;
}
static int maximum_check_val(struct iscsi_key *key, unsigned int *val)
@@ -139,7 +139,7 @@ static int maximum_check_val(struct iscsi_key *key, unsigned int *val)
err = -EINVAL;
}
- return 0;
+ return err;
}
static int minimum_set_val(struct param *param, int idx, unsigned int *val)
More information about the stgt
mailing list