• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef FUSE_IOCTL_H
17 #define FUSE_IOCTL_H
18 
19 #include <sys/ioctl.h>
20 
21 namespace OHOS {
22 namespace FileManagement {
23 namespace CloudFile {
24 static const unsigned int HMDFS_IOC = 0xf2;
25 static const unsigned int HMDFS_DAEMON_IOC_MASK = 0x80;
26 
27 #define HMDFS_IOC_GET_WRITEOPEN_CNT _IOR(HMDFS_IOC, 0x02, uint32_t)
28 #define HMDFS_IOC_HAS_CACHE _IOW(HMDFS_IOC, 0x06, struct HmdfsHasCache)
29 #define HMDFS_IOC_CANCEL_READ _IO(HMDFS_IOC, 0x08)
30 #define HMDFS_IOC_RESET_READ _IO(HMDFS_IOC, 0x09)
31 #define HMDFS_IOC_SAVE_APPID _IOW(HMDFS_IOC, 0x0a, struct HmdfsSaveAppId)
32 #define HMDFS_IOC_SET_CLOUD_GENERATION _IOR(HMDFS_IOC, 0x0b, uint32_t)
33 #define HMDFS_IOC_COPY_FILE _IOW(HMDFS_IOC, 0x0c, struct CloudDiskCopy)
34 
35 /* New daemon-specific ioctls must be defined with the HMDFS_DAEMON_IOC_MASK for proper handling */
36 #define HMDFS_IOC_CLEAN_CACHE_DAEMON _IO(HMDFS_IOC, HMDFS_DAEMON_IOC_MASK + 0x01)
37 
38 } // namespace CloudFile
39 } // namespace FileManagement
40 } // namespace OHOS
41 #endif // FUSE_IOCTL_H
42