If bench is requested to issue only one request, the LFSR initialization
fails. Since LFSR is not needed in this case, we simply switch to
sequential pattern for this request.
}
create_id(seed);
+ if (prefs->status->max == 1)
+ SET_FLAG(PATTERN, prefs->flags, PATTERN_SEQ);
+
if (GET_FLAG(PATTERN, prefs->flags) == PATTERN_RAND) {
prefs->lfsr = malloc(sizeof(struct bench_lfsr));
if (!prefs->lfsr) {
/*
* Pattern type occupies 1st flag bit.
- * If 1, it's sequential, if 0, it's random.
+ * If 0, it's sequential, if 1, it's random.
*/
#define PATTERN_FLAG_POS 0
#define PATTERN_BITMASK 1
/* Progress bar option occupies 6th flag bit */
#define PROGRESS_FLAG_POS 5
-#define PROGRESS_BITMASK 1 /* i.e. "11" in binary form */
+#define PROGRESS_BITMASK 1
#define PROGRESS_NO 0
#define PROGRESS_YES 1