<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[SG匚hang的博客]]></title><description><![CDATA[简单不先于复杂，而是在复杂之后。]]></description><link>https://blog.youkuaiyun.com/sganchang</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; sganchang]]></copyright><item><title><![CDATA[linux内核编译 fatal error: openssl/opensslv.h: No such file or directory]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/103609158</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/103609158</guid><author>sganchang</author><pubDate>Thu, 19 Dec 2019 09:53:45 +0800</pubDate><description><![CDATA[今天编译centos8内核linux-4.18.0-80.el8时出现错误如下:
[root@localhost linux-4.18.0-80.el8]# make 
  HOSTCC  scripts/kconfig/conf.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --syncconfig Kconfig
  SYSTBL...]]></description><category></category></item><item><title><![CDATA[linux内核中区分系统位数的宏]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/92083968</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/92083968</guid><author>sganchang</author><pubDate>Sat, 15 Jun 2019 14:18:49 +0800</pubDate><description><![CDATA[#ifdef CONFIG_X86_32
     printk("---------x86_32---------\n");
 #else    /* CONFIG_X86_64 */
     printk("---------x86_64---------\n");
#endif//CONFIG_X86_32


]]></description><category></category></item><item><title><![CDATA[[VS2019][Win10(1903)]+Visual Studio Enterprise 2019+WDK 适用于 Windows 10，版本 1903]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/91970400</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/91970400</guid><author>sganchang</author><pubDate>Fri, 14 Jun 2019 14:15:20 +0800</pubDate><description><![CDATA[下载
下载 WDK 适用于 Windows 10，版本 1903
下载 Visual Studio Enterprise 2019
网盘分享链接:(包含Visual Studio Enterprise 2019+下载 WDK 适用于 Windows 10，版本 1903+SDK18362)
链接：https://pan.baidu.com/s/1UrdOnHz2l5cWO43ngzLP_A
提取码...]]></description><category></category></item><item><title><![CDATA[Linux统计文件夹中文件个数以及目录个数]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/91432435</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/91432435</guid><author>sganchang</author><pubDate>Tue, 11 Jun 2019 14:25:45 +0800</pubDate><description><![CDATA[循序渐进，

在终端中输入ls -l

如下结果:



终端输出的结果是一行一行的字符，每一行字符对应一个目录或者是文件

如果是文件的话，该行的字符串信息的第一个字符显示的是“-”;

如果是目录的话，该行的字符的第一个显示的是"d"，意即directory，找到这两者之间的区别，运行能够判别



1.显示目录中的文件:

ls -l | grep "^-"

其中“^-”表示字符串的第...]]></description><category></category></item><item><title><![CDATA[Linux内核中双向链表的经典实现]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/91377302</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/91377302</guid><author>sganchang</author><pubDate>Mon, 10 Jun 2019 14:56:39 +0800</pubDate><description><![CDATA[概要
前面一章"介绍双向链表并给出了C/C++/Java三种实现"，本章继续对双向链表进行探讨，介绍的内容是Linux内核中双向链表的经典实现和用法。其中，也会涉及到Linux内核中非常常用的两个经典宏定义offsetof和container_of。内容包括：

Linux中的两个经典宏定义
Linux中双向链表的经典实现

Linux中的两个经典宏定义
倘若你查看过Linux Kernel的源码...]]></description><category></category></item><item><title><![CDATA[linux内核链表源码list.h]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/91377162</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/91377162</guid><author>sganchang</author><pubDate>Mon, 10 Jun 2019 14:54:34 +0800</pubDate><description><![CDATA[#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H


struct list_head {
	struct list_head *next;
	struct list_head *prev;
};

//算出结构体成员对结构体对象首地址的偏移
#define offsetof(TYPE, MEMBER) ((size_t) &amp;((TYPE *)0)-...]]></description><category></category></item><item><title><![CDATA[Linux内核空间内存申请函数kmalloc、kzalloc、vmalloc的区别]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/91374974</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/91374974</guid><author>sganchang</author><pubDate>Mon, 10 Jun 2019 14:23:11 +0800</pubDate><description><![CDATA[我们都知道在用户空间动态申请内存用的函数是 malloc()，这个函数在各种操作系统上的使用是一致的，对应的用户空间内存释放函数是 free()。注意：动态申请的内存使用完后必须要释放，否则会造成内存泄漏，如果内存泄漏发生在内核空间，则会造成系统崩溃。

　　那么，在内核空间中如何申请内存呢？一般我们会用到 kmalloc()、kzalloc()、vmalloc() 等，下面我们介绍一下这些函数...]]></description><category></category></item><item><title><![CDATA[系统调用函数源码，#define SYSCALL_DEFINEx(x, name, ...)宏详细]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/91374697</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/91374697</guid><author>sganchang</author><pubDate>Mon, 10 Jun 2019 14:18:45 +0800</pubDate><description><![CDATA[文章目录内核中的源码以read系统调用为例进行分析:
内核中的源码
//"fs/read_write.c"
372 SYSCALL_DEFINE3(read, unsigned int, fd, char __user *, buf, size_t, count)
373 {
374     struct file *file;
375     ssize_t ret = -EBADF;
376 ...]]></description><category></category></item><item><title><![CDATA[linux kernel asmlinkage的作用]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/91374486</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/91374486</guid><author>sganchang</author><pubDate>Mon, 10 Jun 2019 14:15:51 +0800</pubDate><description><![CDATA[在64位系统中，asmlinkage就是个空宏，并没有实际意义

//"include/linux/linkage.h"

7 #ifdef __cplusplus

8 #define CPP_ASMLINKAGE extern "C"

9 #else

10 #define CPP_ASMLINKAGE

11 #endif

12

13 #ifndef asmlinkage

14 #d...]]></description><category></category></item><item><title><![CDATA[Makefile规则(依赖文件、传递参数)]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/89843702</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/89843702</guid><author>sganchang</author><pubDate>Sun, 05 May 2019 13:51:54 +0800</pubDate><description><![CDATA[Makefile的原则是倒序着写, 如test.c 编到test.bin:
test.bin(目标)  :  test(依赖)
arm-eabi-objcopy -O binary test test.bin  //这里写有依赖文件后怎样生成目标文件
test : test.o
arm-eabi-ld test.o -o test //这里写有test.o后怎样生成test
test.o : te...]]></description><category></category></item><item><title><![CDATA[windows 通过命令行修改hostname]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/85266516</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/85266516</guid><author>sganchang</author><pubDate>Sun, 05 May 2019 13:46:40 +0800</pubDate><description><![CDATA[win+r-&amp;gt;cmd
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

#获取当前hostname
C:\Users\test&amp;gt;hostname
test_old

C:\Users\test&amp;gt;WMIC computersystem where caption=test_old...]]></description><category></category></item><item><title><![CDATA[python打包成执行程序的模块Pyinstaller安装及使用]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/89839877</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/89839877</guid><author>sganchang</author><pubDate>Sun, 05 May 2019 09:59:24 +0800</pubDate><description><![CDATA[文章目录python打包成执行程序的模块PyInstaller安装及使用PyInstall模块安装将python打包成执行程序
python打包成执行程序的模块PyInstaller安装及使用
本文环境windows，python已经安装。
PyInstall模块安装
直接在python安装目录下有个Scripts目录执行命令（以C:\Python27\Scripts目录为例)
pip insta...]]></description><category></category></item><item><title><![CDATA[多路IO复用:poll、select、epoll 函数]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/84795656</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/84795656</guid><author>sganchang</author><pubDate>Tue, 04 Dec 2018 18:32:22 +0800</pubDate><description><![CDATA[多路IO复用: 就是实现同时监控多个文件描述符(此类文件描述符必须为不可操作时会进入堵塞状态), 会堵塞直到有一个或多个文件描述符可操作为止, 通过返回值找出可操作的文件描术符.

poll函数

#include &amp;lt;poll.h&amp;gt;
int poll(struct pollfd *fds, nfds_t nfds, int timeout);

  每个要被监控的文件描术符需要一个st...]]></description><category></category></item><item><title><![CDATA[linux CentOS修改网卡名]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/84795167</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/84795167</guid><author>sganchang</author><pubDate>Tue, 04 Dec 2018 18:23:16 +0800</pubDate><description><![CDATA[先ifconfig查看网卡名eth0
[root@centos69 ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:56:B2:09:F9  
          inet addr:172.16.5.12  Bcast:172.16.5.255  Mask:255.255.255.0
          inet6 addr: f...]]></description><category></category></item><item><title><![CDATA[c++程序复制文件C:\Windows\system32\文件夹问题,windows上的坑]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/79884575</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/79884575</guid><author>sganchang</author><pubDate>Tue, 10 Apr 2018 17:47:55 +0800</pubDate><description><![CDATA[因为程序是32位的，在64位系统下，所有对system32的操作都会被重定向为syswow64



关闭重定向

if (Wow64EnableWow64FsRedirection(FALSE))//关闭重定向
{

MoveFileEx("C:\\Windows\\SysWow64\\drivers\\aaa.sys",

 "C:\\Windows\\System32\\drivers\...]]></description><category></category></item><item><title><![CDATA[zip bzip2 gzip xz tar文件解压缩]]></title><link>https://blog.youkuaiyun.com/sganchang/article/details/78780570</link><guid>https://blog.youkuaiyun.com/sganchang/article/details/78780570</guid><author>sganchang</author><pubDate>Tue, 12 Dec 2017 11:51:13 +0800</pubDate><description><![CDATA[//压缩文件
zip bzip2 gzip xz tar
确定文件格式
file xxx //查看文件压缩格式
1.zip
压缩 zip -r xxx.zip xxx ==&gt; xxx.zip
解压 unzip xxx.zip //解压后xxx.zip存在
2.gzip
压缩 gzip xxx ==&gt; xxx.gz
解压 gunzip xxx.gz ==&gt; xxx 解压后xxx.g...]]></description><category></category></item></channel></rss>