2009-09-25 13:20:13 +00:00
|
|
|
/*
|
2012-12-13 15:25:48 +00:00
|
|
|
* virstoragefile.h: file utility functions for FS storage backend
|
2009-09-25 13:20:13 +00:00
|
|
|
*
|
2016-05-28 12:43:23 +00:00
|
|
|
* Copyright (C) 2007-2009, 2012-2016 Red Hat, Inc.
|
2009-09-25 13:20:13 +00:00
|
|
|
* Copyright (C) 2007-2008 Daniel P. Berrange
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-09-20 22:30:55 +00:00
|
|
|
* License along with this library. If not, see
|
2012-07-21 10:06:23 +00:00
|
|
|
* <http://www.gnu.org/licenses/>.
|
2009-09-25 13:20:13 +00:00
|
|
|
*/
|
|
|
|
|
2019-06-18 16:12:47 +00:00
|
|
|
#pragma once
|
2009-09-25 13:20:13 +00:00
|
|
|
|
2021-01-21 14:44:53 +00:00
|
|
|
#include "internal.h"
|
2014-03-28 18:38:43 +00:00
|
|
|
|
2017-02-23 16:10:43 +00:00
|
|
|
int virStorageFileParseBackingStoreStr(const char *str,
|
|
|
|
char **target,
|
|
|
|
unsigned int *chainIndex)
|
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
|
|
|
|
|
2012-12-11 19:10:51 +00:00
|
|
|
int virStorageFileGetSCSIKey(const char *path,
|
2019-01-15 20:59:21 +00:00
|
|
|
char **key,
|
|
|
|
bool ignoreError);
|
2019-01-16 00:07:07 +00:00
|
|
|
int virStorageFileGetNPIVKey(const char *path,
|
|
|
|
char **key);
|
2011-07-20 09:40:53 +00:00
|
|
|
|
2014-05-02 17:22:17 +00:00
|
|
|
typedef int
|
|
|
|
(*virStorageFileSimplifyPathReadlinkCallback)(const char *path,
|
|
|
|
char **link,
|
|
|
|
void *data);
|
|
|
|
char *virStorageFileCanonicalizePath(const char *path,
|
|
|
|
virStorageFileSimplifyPathReadlinkCallback cb,
|
|
|
|
void *cbdata);
|