摘要:
* [root@localhost zg.a]# gcc passwd.c modify_passwd.c validate_user.c -I. -o videocollect -DMYDEBUG -Wall -g -lcrypto
* modify_passwd.c: In function `modify_passwd':
* modify_passwd.c:89: error: invalid operands to binary -
* 错误原因:p和pbuf类型不一致。
* 解决方案:
* 1、修改p的定义为: unsigned char *p = NULL;
* 2、修改"p - pbuf"为: p - (char *)pbuf
阅读全文
posted @ 2009-11-19 12:48
刘伟_luvi
阅读(629)
推荐(0)
摘要:
(1)使用utu-bootloader:
setenv bootargs 'console=ttySAC0 root=/dev/nfs nfsroot=192.168.0.65:/data/s3c2440_recover ip=192.168.0.168:192.168.0.1:192.168.0.1:255.255.255.0:www.yctek.com:eth0:off'
/* nfsroot对应你pc机的IP和你解压的文件系统的路径,请酌情修改
* ip指定你的开发板的IP、网关、DNS、掩码,(shamefaced)我也不知道是否真这样?
* 高手请赐教!但是只要你改对了IP和掩码,基本就没有问题了。
* 掩码后面应该是域名了,这个是扬创的域名
* 再往后的eth0为什么为off?不懂,but, it do work well!
**************************************************************************/
(2)使用vivi:
param set linux_cmd_line
阅读全文
posted @ 2009-11-18 15:17
刘伟_luvi
阅读(1779)
推荐(0)
摘要:
Come from: http://burtleburtle.net/bob/hash/evahash.html
This paper presents new hash functions for table lookup using 32-bit or 64-bit arithmetic. These hashes are fast and reliable. A framework is also given for evaluating hash functions.
IntroductionHash tables [Knuth6] are a common data structure. They consist of an array (the hash table) and a mapping (the hash function). The hash function maps keys into hash values. Items stored in a hash table must have keys. The hash function maps t
阅读全文
posted @ 2009-06-05 09:22
刘伟_luvi
阅读(929)
推荐(0)
摘要:
我们一直在努力!写一个函数的帮助文件,如果只是为了自己方便(不要求严格的格式,自己能看懂就行,别拿出来让别人难以理解)的话,是相当简单的,看一下MAN文件就大致了解了。在/usr/share/man/manX/其中‘X’代表的是数字,也就是MAN的类别。***************************************Linux下最通用的领域及其名称及说明如下:...
阅读全文
posted @ 2008-11-20 11:39
刘伟_luvi
阅读(1280)
推荐(0)
摘要:
今天用gcc 编译一个文件出现如下错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token语句都快注释完了,编译还是通不过,最后检查include,才发现,原来是incl...
阅读全文
posted @ 2008-10-16 16:30
刘伟_luvi
阅读(38724)
推荐(0)
摘要:
1 用户命令, 可由任何人启动的。
2 系统调用, 即由内核提供的函数。
3 例程, 即库函数。
4 设备, 即/dev目录下的特殊文件。
5 文件格式描述, 例如/etc/passwd。
6 游戏, 不用解释啦!
7 杂项, 例如宏命令包、惯例等。
8 系统管理员工具, 只能由root启动。
9 其他(Linux特定的), 用来存放内核例行程序的文档。
阅读全文
posted @ 2008-10-10 10:54
刘伟_luvi
阅读(8812)
推荐(0)
摘要:
今天在VC6中测试一下数组的传址方式,发现在main函数中,数组名所指向的地址是与数组中每0个元素的地址相同,但当把数组传给被调函数时,被调函数的形参是以指针的形式接收实参的地址。在下边的程序中,当你第一次运行的时候,看系统分配给array数组的地址是什么,然后更改程序;2:把printf("4:\t1245044==%s\n", 1245044);语句中的后边一个“1245044...
阅读全文
posted @ 2008-09-03 11:08
刘伟_luvi
阅读(541)
推荐(0)
摘要:
今天卸载了MYSQL,又重新安装了一个新的版本,哪知道在配置时启动MYSQL服务出错:“在本地计算机无法启动MySQL服务。错误1067:进程意外终止”,在网上找了一个小时,修改my.ini,最后还是没有成功。无奈之下,我就把MYSQL安装目录下的配置文件备份为MY.INI.BAK,并删除my.ini,然后从开始菜单重新启动MYSQL配置向导,配置之后MYSQL服务倒是启动...
阅读全文
posted @ 2008-08-14 09:26
刘伟_luvi
阅读(21280)
推荐(0)
摘要:
经常见到嵌入式设计中,将某一程序段的入口地址转换为一个函数,我们来分析一下它的成分:
如在bootloader的0x00000020地址上的双字单元中有这样一条语句:
@Address is 0x00000020
b powerdown @Jump to the flag "powerdown"
阅读全文
posted @ 2008-05-23 22:16
刘伟_luvi
阅读(814)
推荐(0)
摘要:
今天看到一本书中有与下面这种结构体类似的使用形式:
typedef struct some_dev{
unsigned int var1 : 8;
unsigned int var2 : 13;
}
特意在VC++ 6.0中做了几个测试:
阅读全文
posted @ 2008-05-21 22:18
刘伟_luvi
阅读(1368)
推荐(0)