summaryrefslogtreecommitdiffstats
path: root/hw/block-common.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2012-07-10 11:12:31 +0200
committerKevin Wolf <kwolf@redhat.com>2012-07-17 16:48:30 +0200
commit9db1c0f7a94c6382e2b3e1365566a9a8b8ae74c1 (patch)
tree5296680df6db7c0f5d587d75fcce27810a9a22ec /hw/block-common.h
parent0e8a8c8f6d988f3907d7cdba877a711a4d47ec5c (diff)
downloadhqemu-9db1c0f7a94c6382e2b3e1365566a9a8b8ae74c1.zip
hqemu-9db1c0f7a94c6382e2b3e1365566a9a8b8ae74c1.tar.gz
hd-geometry: Move disk geometry guessing back from block.c
Commit f3d54fc4 factored it out of hw/ide.c for reuse. Sensible, except it was put into block.c. Device-specific functionality should be kept in device code, not the block layer. Move it to hw/hd-geometry.c, and make stylistic changes required to keep checkpatch.pl happy. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/block-common.h')
-rw-r--r--hw/block-common.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/hw/block-common.h b/hw/block-common.h
new file mode 100644
index 0000000..3a4d4c6
--- /dev/null
+++ b/hw/block-common.h
@@ -0,0 +1,21 @@
+/*
+ * Common code for block device models
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (c) 2003-2008 Fabrice Bellard
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or
+ * later. See the COPYING file in the top-level directory.
+ */
+
+#ifndef HW_BLOCK_COMMON_H
+#define HW_BLOCK_COMMON_H
+
+#include "qemu-common.h"
+
+/* Hard disk geometry */
+
+void hd_geometry_guess(BlockDriverState *bs,
+ int *pcyls, int *pheads, int *psecs);
+
+#endif
OpenPOWER on IntegriCloud