xref: /haiku/src/tests/add-ons/kernel/kernelland_emu/device_manager.cpp (revision fc7456e9b1ec38c941134ed6d01c438cf289381e)
1 /*
2  * Copyright 2002-2009, Haiku Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT license.
4  *
5  * Authors:
6  *		Ingo Weinhold, bonefish@cs.tu-berlin.de.
7  *		Axel Dörfler, axeld@pinc-software.de.
8  */
9 
10 #include <stdio.h>
11 
12 #include <fs/devfs.h>
13 
14 
15 extern "C" status_t
16 devfs_unpublish_file_device(const char* path)
17 {
18 	printf("ubpublish file device: path \"%s\"\n", path);
19 	return B_OK;
20 }
21 
22 
23 extern "C" status_t
24 devfs_publish_file_device(const char* path, const char* filePath)
25 {
26 	printf("publish file device: path \"%s\" (file path \"%s\")\n", path, filePath);
27 	return B_OK;
28 }
29 
30 
31 extern "C" status_t
32 devfs_unpublish_partition(const char *path)
33 {
34 	printf("unpublish partition: %s\n", path);
35 	return B_OK;
36 }
37 
38 
39 extern "C" status_t
40 devfs_publish_partition(const char *path, const partition_info *info)
41 {
42 	if (info == NULL)
43 		return B_BAD_VALUE;
44 
45 	printf("publish partition: %s (device \"%s\", size %lld)\n", path, info->device, info->size);
46 	return B_OK;
47 }
48 
49 
50 extern "C" status_t
51 devfs_rename_partition(const char* devicePath, const char* oldName, const char* newName)
52 {
53 	printf("rename partition: %s (oldName \"%s\", newName \"%s\")\n",
54 		devicePath, oldName, newName);
55 	return B_OK;
56 }
57