资源简介
升级e2fsprogs ,使得mkfs.ext4 -O ^metadata_csum,^64bit使用不报错
代码片段和文件信息
/*
* Basic program to add ext4 encryption to a file system
*
* Copyright 2015 Google Inc.
*
* %Begin-Header%
* This file may be redistributed under the terms of the GNU Public
* License.
* %End-Header%
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
int main (int argc char *argv[])
{
errcode_t retval = 0;
ext2_filsys fs;
setbuf(stdout NULL);
setbuf(stderr NULL);
initialize_ext2_error_table();
if (argc != 2) {
fprintf(stderr “%s: Usage \n“ argv[0]);
exit(1);
}
retval = ext2fs_open(argv[1] EXT2_FLAG_RW 0 0
unix_io_manager &fs);
if (retval) {
com_err(argv[0] retval “while trying to open ‘%s‘“
argv[1]);
exit(1);
}
if (!ext2fs_has_feature_encrypt(fs->super)) {
ext2fs_set_feature_encrypt(fs->super);
fs->super->s_encrypt_algos[0] =
EXT4_ENCRYPTION_MODE_AES_256_XTS;
fs->super->s_encrypt_algos[1] =
EXT4_ENCRYPTION_MODE_AES_256_CTS;
ext2fs_mark_super_dirty(fs);
printf(“Ext4 encryption enabled on %s\n“ argv[1]);
} else
printf(“Ext4 encryption already enabled on %s\n“ argv[1]);
retval = ext2fs_close(fs);
if (retval) {
com_err(argv[0] retval “while trying to close ‘%s‘“
argv[1]);
exit(1);
}
return (0);
}
相关资源
- Mycat-server-1.4-release-linux.tar
- linux Apache httpd-2.2.9.tar.gz
- 高质量嵌入式LinuxC编程_试读版PDF电子
- linux1.0内核详解含1.0源码
- 音视频即时通讯Linux
- linux应用程序开发详解完整版PDF+源码
- kali linux 无线密码破解教程
- linux samba
- 最新windows和linux的adb工具
- 无线网卡ath9k驱动Linux
- gawk-4.1.3.tar.gz
- DOS常用命令详细讲解
- Linux Device Drivers Development_ Develop cust
- 精通linuxlinux书籍
- Linux运维工程师面试题总结
- redis-5.0.6.tar目前最新安装包.zip
- 精简版黑白棋demo-Qt
- 快乐的 Linux 命令行中英文PDF
- 基于Centos6.9+7.4主备DNS服务器搭建实战
- Wireshark实验讲义.doc
- linux多线程编程书籍
- linux expect安装及expect,tcl安装包
- LaTeX命令速查手册!
- torchvision-0.5.0+cpu-cp36-cp36m-linux_x86_64.
- Orange pi PC(H3)移植linux总结
- Linux Wireless架构总结.pdf
- 博创2410开发板光盘资料---linux实验
- 互联网各厂运维方向面试题汇总附答
- LInux项目实战及程序员必备
- PN532用户手册官方 英文版内含详细命
评论
共有 条评论