04_01_Linux

本文介绍Linux系统中用户和组的基本管理操作,包括用户和组的添加、修改、删除,以及如何切换用户组和设置用户密码等。同时涵盖了各种常用选项如指定UID、GID、家目录、shell等。

用户管理

/etc/passwd:

用户名:密码:UID:GID:注释:家目录:默认shell

/etc/group:

组名:密码:GID:以此组为其附加组的用户列表

/etc/group:

用户名:密码:最近一次修改密码时间:最短使用期限:最长使用期限:警告时间:非法活动时间:过期时间


etc/shells:指定了当前系统可用的安全shell

添加用户指令:useradd    

 -u:指定UID

[root@bogon /]# useradd -u 1000 user1
[root@bogon /]# tail -1 /etc/passwd
user1:x:1000:1000::/home/user1:/bin/bash

-g:指定组或组ID (mygroup组在03_04章建立)

[root@bogon /]# useradd -g mygroup  user2
[root@bogon /]# tail -1 /etc/passwd
user2:x:1001:502::/home/user2:/bin/bash

-G:附加组

[root@bogon /]# useradd -G mygroup  user3
[root@bogon /]# tail -1 /etc/passwd
user3:x:1002:1002::/home/user3:/bin/bash

-c:注释信息

-d:指定存放路径

[root@bogon /]# useradd -c "tony blare" -d /home/blare  user4
[root@bogon /]# tail -1 etc/passwd
user4:x:1003:1003:tony blare:/home/blare:/bin/bash


-r:添加系统用户  系统用户没有家用户

[root@bogon /]# useradd -r apache1
[root@bogon /]# tail -1 etc/passwd
apache1:x:496:493::/home/apache1:/bin/bash


-s:指定shell路径

查看支持的shell:

[root@bogon /]# cat etc/shells 
/bin/sh
/bin/bash
/sbin/nologin
/bin/tcsh
/bin/csh


指定nologin(不合法shell):

[root@bogon /]# useradd -s /sbin/nologin  user5
[root@bogon /]# su user5
This account is currently not available.


指定tcsh:

[root@bogon /]# useradd -s /bin/tcsh  user66
[root@bogon /]# su user6
[user6@bogon /]$ su user66
Password: 
su: incorrect password
[user6@bogon /]$ su root
Password: 
[root@bogon /]# su user66
[user66@bogon /]$ 


环境变量:

PATH

HISTSIZE

SEHLL:查看当前用户shell

[user66@bogon /]$ echo $SHELL
/bin/tcsh

-m:强行为用户添加家目录  -k(与-m配合使用):把etc/skel的用户框架全部复制到家目录(一般强制复制)


删除用户

userdel:

userdel [option] USERNAME

不删除家目录

[root@bogon /]# ls /home
blare  tom  user1  user2  user3  user5  user6  user66  vergong
[root@bogon /]# userdel user1
[root@bogon /]# ls
bin   dev  home  lost+found  mnt  proc  sbin     srv  test   tmp  var
boot  etc  lib   media       opt  root  selinux  sys  test2  usr
[root@bogon /]# ls home
blare  tom  user1  user2  user3  user5  user6  user66  vergong
[root@bogon /]# 


删除家目录:

[root@bogon /]# userdel -r user2
[root@bogon /]# ls
bin   dev  home  lost+found  mnt  proc  sbin     srv  test   tmp  var
boot  etc  lib   media       opt  root  selinux  sys  test2  usr
[root@bogon /]# ls home
blare  tom  user1  user3  user5  user6  user66  vergong



id:查看用户的账号属性信息

查看当前用户id:

[user66@bogon /]$ id
uid=1006(user66) gid=1006(user66) groups=1006(user66) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023


查看其它用户id+用户名:

[user66@bogon /]$ id user1
uid=1000(user1) gid=1000(user1) groups=1000(user1)


finger:检索用户账号信息

用法:finger USERNAME


修改用户账号属性:

usermod

-u:改UID

[root@bogon /]# id user3
uid=1002(user3) gid=1002(user3) groups=1002(user3),502(mygroup)
[root@bogon /]# usermod -u 2002 user3
[root@bogon /]# id user3
uid=2002(user3) gid=1002(user3) groups=1002(user3),502(mygroup)

-g:GID基本组

-G:附加组 覆盖以前附加组  (加-a不覆盖)

-c:注释信息

-d:更改家目录 (-m家目录的内容复制到新家目录)

-s:更改shell

-L:锁定账号

-U:解锁账号



修改用户shell:

chsh

[user3@bogon /]$ echo $SHELL
/bin/bash
[root@bogon /]# chsh user3
Changing shell for user3.
New shell [/bin/bash]: /bin/tcsh
Shell changed.
[root@bogon /]# su user3
[user3@bogon /]$ echo $SHELL
/bin/tcsh

chfn:修改注释信息


更改用户密码:

passwd  [USERNAME]

--stdin:从标准输入接收密码

[root@bogon /]# passwd user3
Changing password for user user3.
New password: 
BAD PASSWORD: it is too simplistic/systematic
BAD PASSWORD: is too simple
Retype new password: 
passwd: all authentication tokens updated successfully.

-l:锁定账号

-u:解锁账号

-d:清空密码



检查用户完整性:

pwck



组管理


创建组:

groupadd

-g:GID

-r:添加为系统组

[root@bogon /]# groupadd -r group1
[root@bogon /]# tail -1 etc/group
group1:x:492:


修改组:
groupmod

-g:改GID

-n:更改名字


删除组:

groupdel


设置组密码:

gpasswd  [GROUPNAME]



临时切换基本组:

newgrp [GROUPNAME]   <-->exit

[root@bogon /]# useradd hadoop
[root@bogon /]# su hadoop
[hadoop@bogon /]$ cd /tmp
[hadoop@bogon tmp]$ touch a.hadoop
[hadoop@bogon tmp]$ ls -l
total 104
-rw-rw-r--. 1 hadoop  hadoop     0 Nov 11 05:38 a.hadoop
[hadoop@bogon tmp]$ newgrp mygroup
Password: 
[hadoop@bogon tmp]$ id
uid=2003(hadoop) gid=502(mygroup) groups=2003(hadoop),502(mygroup) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[hadoop@bogon tmp]$ touch b.hadoop
[hadoop@bogon tmp]$ ls -l b.hadoop 
-rw-r--r--. 1 hadoop mygroup 0 Nov 11 05:43 b.hadoop
[hadoop@bogon tmp]$ exit
exit
[hadoop@bogon tmp]$ id
uid=2003(hadoop) gid=2003(hadoop) groups=2003(hadoop) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023



chage

-d:最近一次修改时间

-E:过期时间

-I:非活动时间

-m:最短使用期限

-M:最长使用期限

-W:警告时间










make -C /lib/modules/4.9.337-tegra/build M=/APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver modules make[1]: Entering directory '/usr/src/linux-headers-4.9.337-tegra-ubuntu18.04_aarch64/kernel-4.9' CC [M] /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-core.o CC [M] /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.o In file included from ./include/linux/kernel.h:13:0, from ./include/linux/list.h:8, from ./include/linux/kobject.h:20, from ./include/linux/cdev.h:4, from /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:10: /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c: In function ‘sgm_get_user_pages’: /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:184:11: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=] pr_debug("sg_dma_len(&sgl[0])=0x%08x.\n", sg_dma_len(&sgl[0])); ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:184:2: note: in expansion of macro ‘pr_debug’ pr_debug("sg_dma_len(&sgl[0])=0x%08x.\n", sg_dma_len(&sgl[0])); ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:190:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 6 has type ‘long unsigned int’ [-Wformat=] pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u (FIRST)\n", 0, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:190:3: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u (FIRST)\n", 0, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:190:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘size_t {aka long unsigned int}’ [-Wformat=] pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u (FIRST)\n", 0, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:190:3: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u (FIRST)\n", 0, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:199:13: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 6 has type ‘long unsigned int’ [-Wformat=] pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u\n", i, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:199:4: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u\n", i, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:199:13: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘size_t {aka long unsigned int}’ [-Wformat=] pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u\n", i, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:199:4: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u\n", i, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:206:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 6 has type ‘long unsigned int’ [-Wformat=] pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u (LAST)\n", i, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:206:3: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u (LAST)\n", i, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:206:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘size_t {aka long unsigned int}’ [-Wformat=] pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u (LAST)\n", i, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:206:3: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u (LAST)\n", i, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:213:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 6 has type ‘long unsigned int’ [-Wformat=] pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u (SINGLE/FIRST/LAST)\n", 0, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:213:3: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u (SINGLE/FIRST/LAST)\n", 0, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:213:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘size_t {aka long unsigned int}’ [-Wformat=] pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u (SINGLE/FIRST/LAST)\n", 0, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:213:3: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u, length=%u (SINGLE/FIRST/LAST)\n", 0, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c: In function ‘sgm_kernel_pages’: /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:322:11: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=] pr_debug("sg_dma_len(&sgl[0])=0x%08x.\n", sg_dma_len(&sgl[0])); ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:322:2: note: in expansion of macro ‘pr_debug’ pr_debug("sg_dma_len(&sgl[0])=0x%08x.\n", sg_dma_len(&sgl[0])); ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:328:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 6 has type ‘long unsigned int’ [-Wformat=] pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u length=%u (F)\n", 0, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:328:3: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u length=%u (F)\n", 0, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:328:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘size_t {aka long unsigned int}’ [-Wformat=] pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u length=%u (F)\n", 0, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:328:3: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u length=%u (F)\n", 0, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:337:13: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 6 has type ‘long unsigned int’ [-Wformat=] pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u length=%u\n", i, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:337:4: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u length=%u\n", i, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:337:13: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘size_t {aka long unsigned int}’ [-Wformat=] pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u length=%u\n", i, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:337:4: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: page=0x%p, pfn=%lu, offset=%u length=%u\n", i, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:344:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 5 has type ‘long unsigned int’ [-Wformat=] pr_debug("%04d: pfn=%lu, offset=%u length=%u (L)\n", i, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:344:3: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: pfn=%lu, offset=%u length=%u (L)\n", i, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:344:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 6 has type ‘size_t {aka long unsigned int}’ [-Wformat=] pr_debug("%04d: pfn=%lu, offset=%u length=%u (L)\n", i, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:344:3: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: pfn=%lu, offset=%u length=%u (L)\n", i, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:351:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 5 has type ‘long unsigned int’ [-Wformat=] pr_debug("%04d: pfn=%lu, offset=%u length=%u (F)\n", 0, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:351:3: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: pfn=%lu, offset=%u length=%u (F)\n", 0, ^~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:351:12: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 6 has type ‘size_t {aka long unsigned int}’ [-Wformat=] pr_debug("%04d: pfn=%lu, offset=%u length=%u (F)\n", 0, ^ ./include/linux/printk.h:271:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ ./include/linux/printk.h:319:2: note: in expansion of macro ‘dynamic_pr_debug’ dynamic_pr_debug(fmt, ##__VA_ARGS__) ^~~~~~~~~~~~~~~~ /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-sgm.c:351:3: note: in expansion of macro ‘pr_debug’ pr_debug("%04d: pfn=%lu, offset=%u length=%u (F)\n", 0, ^~~~~~~~ CC [M] /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-ioctl.o CC [M] /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma-bit.o LD [M] /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma.o Building modules, stage 2. MODPOST 1 modules CC /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma.mod.o LD [M] /APP_linux_01/Xilinx_Answer_65444_Linux_Files/driver/xdma.ko make[1]: Leaving directory '/usr/src/linux-headers-4.9.337-tegra-ubuntu18.04_aarch64/kernel-4.9'
06-18
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值