aboutsummaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
authoriap10@striker.cl.cam.ac.uk <iap10@striker.cl.cam.ac.uk>2004-02-03 19:21:37 +0000
committeriap10@striker.cl.cam.ac.uk <iap10@striker.cl.cam.ac.uk>2004-02-03 19:21:37 +0000
commit312d18978b12cbec98d87a3d3a85fe6b6da4eb58 (patch)
tree74234587ca80e5a2189390b420af2bca8fc7d94c /tools/misc
parentdf685fc0e79f6ce3a13aee9a9bee04f072121cf3 (diff)
downloadxen-312d18978b12cbec98d87a3d3a85fe6b6da4eb58.tar.gz
xen-312d18978b12cbec98d87a3d3a85fe6b6da4eb58.tar.bz2
xen-312d18978b12cbec98d87a3d3a85fe6b6da4eb58.zip
bitkeeper revision 1.702 (401ff4c1wsnjlon2jUHePX5hLh-cGA)
Delete junk tools.
Diffstat (limited to 'tools/misc')
-rw-r--r--tools/misc/xen_refresh_dev.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/tools/misc/xen_refresh_dev.c b/tools/misc/xen_refresh_dev.c
deleted file mode 100644
index b9ea025c1f..0000000000
--- a/tools/misc/xen_refresh_dev.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/******************************************************************************
- * xen_refresh_dev.c
- *
- * Refresh our view of a block device by rereading its partition table. This
- * is necessary to synchronise with VBD attaches and unattaches in Xen.
- * Currently there's no automatic plumbing of attach/unattach requests.
- *
- * Copyright (c) 2003, K A Fraser
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/mount.h> /* BLKRRPART */
-
-int main(int argc, char **argv)
-{
- int fd;
-
- if ( argc != 2 )
- {
- fprintf(stderr, "xen_refresh_dev <blkdev>\ne.g., /dev/xvda\n");
- return 1;
- }
-
- if ( (fd = open(argv[1], O_RDWR)) == -1 )
- {
- fprintf(stderr, "Error opening %s: %s (%d)\n",
- argv[1], strerror(errno), errno);
- return 1;
- }
-
- if ( ioctl(fd, BLKRRPART) == -1 )
- {
- fprintf(stderr, "Error executing BLKRRPART on %s: %s (%d)\n",
- argv[1], strerror(errno), errno);
- return 1;
- }
-
- close(fd);
-
- return 0;
-}