# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID d8b35f72a587a99f554632fe4022261c509e038e
# Parent f31494465fb07d9f790716683d7b92eab4ac8835
Break proc paths out into separate include file, rather than inlining them.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
diff -r f31494465fb0 -r d8b35f72a587 tools/xenstore/xenstored_domain.c
--- a/tools/xenstore/xenstored_domain.c Fri Oct 21 11:07:14 2005
+++ b/tools/xenstore/xenstored_domain.c Fri Oct 21 12:30:31 2005
@@ -33,6 +33,7 @@
#include "talloc.h"
#include "xenstored_core.h"
#include "xenstored_domain.h"
+#include "xenstored_proc.h"
#include "xenstored_watch.h"
#include "xenstored_test.h"
@@ -449,7 +450,7 @@
char str[20];
struct domain *dom0;
- fd = open("/proc/xen/xsd_mfn", O_RDONLY);
+ fd = open(XENSTORED_PROC_MFN, O_RDONLY);
rc = read(fd, str, sizeof(str));
str[rc] = '\0';
@@ -457,7 +458,7 @@
close(fd);
- fd = open("/proc/xen/xsd_port", O_RDONLY);
+ fd = open(XENSTORED_PROC_PORT, O_RDONLY);
rc = read(fd, str, sizeof(str));
str[rc] = '\0';
diff -r f31494465fb0 -r d8b35f72a587 tools/xenstore/xenstored_proc.h
--- /dev/null Fri Oct 21 11:07:14 2005
+++ b/tools/xenstore/xenstored_proc.h Fri Oct 21 12:30:31 2005
@@ -0,0 +1,27 @@
+/*
+ Copyright (C) 2005 XenSource Ltd
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*/
+
+#ifndef _XENSTORED_PROC_H
+#define _XENSTORED_PROC_H
+
+#define XENSTORED_PROC_MFN "/proc/xen/xsd_mfn"
+#define XENSTORED_PROC_PORT "/proc/xen/xsd_port"
+
+
+#endif /* _XENSTORED_PROC_H */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|