mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
235ccac7f3
Summary: MSVC is broken as it doesn't understand the various macros used to generate XdrTrait for specific types, and I can't figure out a way to make that work. Even if I provide dummy version of these, the buck build breaks due to glog trying to redefine the ERROR symbol that some Microsoft headers contain. For now, let's just ifdef it out since it's unlikely that we're going to be using NFS on Windows anytime soon. Reviewed By: singhsrb Differential Revision: D26293519 fbshipit-source-id: bbaf325c7d1f1688327708360244797a6d48179e
62 lines
1.3 KiB
C++
62 lines
1.3 KiB
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This software may be used and distributed according to the terms of the
|
|
* GNU General Public License version 2.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#ifndef _WIN32
|
|
|
|
#include "eden/fs/nfs/NfsdRpc.h"
|
|
#include "eden/fs/nfs/rpc/Rpc.h"
|
|
|
|
/*
|
|
* Mountd prococol described in the Appendix I of RFC1813:
|
|
* https://tools.ietf.org/html/rfc1813#page-106
|
|
*/
|
|
|
|
namespace facebook::eden {
|
|
|
|
constexpr uint32_t kMountdProgNumber = 100005;
|
|
constexpr uint32_t kMountdProgVersion = 3;
|
|
|
|
/**
|
|
* Procedure values.
|
|
*/
|
|
enum class mountProcs : uint32_t {
|
|
null = 0,
|
|
mnt = 1,
|
|
dump = 2,
|
|
umnt = 3,
|
|
umntAll = 4,
|
|
exprt = 5,
|
|
};
|
|
|
|
enum class mountstat3 {
|
|
MNT3_OK = 0, /* no error */
|
|
MNT3ERR_PERM = 1, /* Not owner */
|
|
MNT3ERR_NOENT = 2, /* No such file or directory */
|
|
MNT3ERR_IO = 5, /* I/O error */
|
|
MNT3ERR_ACCES = 13, /* Permission denied */
|
|
MNT3ERR_NOTDIR = 20, /* Not a directory */
|
|
MNT3ERR_INVAL = 22, /* Invalid argument */
|
|
MNT3ERR_NAMETOOLONG = 63, /* Filename too long */
|
|
MNT3ERR_NOTSUPP = 10004, /* Operation not supported */
|
|
MNT3ERR_SERVERFAULT = 10006 /* A failure on the server */
|
|
};
|
|
|
|
/**
|
|
* Return value of the mnt procedure.
|
|
*/
|
|
struct mountres3_ok {
|
|
nfs_fh3 fhandle3;
|
|
std::vector<auth_flavor> auth_flavors;
|
|
};
|
|
EDEN_XDR_SERDE_DECL(mountres3_ok, fhandle3, auth_flavors);
|
|
|
|
} // namespace facebook::eden
|
|
|
|
#endif
|