From b1dcc3355c7d2ab2f11ddaa4370422970543549a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 1 Feb 2023 13:20:25 -0700 Subject: tools: Drop xway-swap-bytes tool This is very old and does not appear to be used. The CONFIG option enabling it is no-longer present. Drop it. Signed-off-by: Simon Glass --- tools/xway-swap-bytes.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 tools/xway-swap-bytes.c (limited to 'tools/xway-swap-bytes.c') diff --git a/tools/xway-swap-bytes.c b/tools/xway-swap-bytes.c deleted file mode 100644 index 3a6d82d54a0..00000000000 --- a/tools/xway-swap-bytes.c +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include -#include - -#ifndef BUFSIZ -# define BUFSIZ 4096 -#endif - -#undef BUFSIZ -# define BUFSIZ 64 -int main (void) -{ - short ibuff[BUFSIZ], obuff[BUFSIZ]; - int rc, i, len; - - while ((rc = read (0, ibuff, sizeof (ibuff))) > 0) { - memset (obuff, 0, sizeof (obuff)); - for (i = 0; i < (rc + 1) / 2; i++) { - obuff[i] = ibuff[i ^ 1]; - } - - len = (rc + 1) & ~1; - - if (write (1, obuff, len) != len) { - perror ("read error"); - return (EXIT_FAILURE); - } - - memset (ibuff, 0, sizeof (ibuff)); - } - - if (rc < 0) { - perror ("read error"); - return (EXIT_FAILURE); - } - return (EXIT_SUCCESS); -} -- cgit v1.2.3