From a675b9d8d0ee0f23f59bd6426cf42ed673a26c50 Mon Sep 17 00:00:00 2001 From: Philip Balister Date: Fri, 25 Feb 2011 06:52:01 -0800 Subject: usrp_e : Prevent people from typing in large numbers that crash the test. --- host/usrp_e_utils/usrp-e-loopback.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'host/usrp_e_utils') diff --git a/host/usrp_e_utils/usrp-e-loopback.c b/host/usrp_e_utils/usrp-e-loopback.c index a63882475..78e2b5d16 100644 --- a/host/usrp_e_utils/usrp-e-loopback.c +++ b/host/usrp_e_utils/usrp-e-loopback.c @@ -212,6 +212,11 @@ int main(int argc, char *argv[]) packet_data_length = atoi(argv[1]); + if (packet_data_length > 1016) { + packet_data_length = 1016; + printf("Max data length = 1016, clamping.\n"); + } + fp = open("/dev/usrp_e0", O_RDWR); printf("fp = %d\n", fp); -- cgit v1.2.3