내가 개띠이긴 하지만..
애인이 보내오는 애인네 고냥이를 보면..
고양이를 기르고 싶어진다.
'개소리 왈왈 > 영화' 카테고리의 다른 글
아이언맨 2 (8) | 2010.05.02 |
---|---|
광화문 / 경복궁 (4) | 2010.04.25 |
free for what? (0) | 2010.04.02 |
end of D+848 (0) | 2010.03.29 |
그린존 (Grren zone, 2010) (4) | 2010.03.28 |
아이언맨 2 (8) | 2010.05.02 |
---|---|
광화문 / 경복궁 (4) | 2010.04.25 |
free for what? (0) | 2010.04.02 |
end of D+848 (0) | 2010.03.29 |
그린존 (Grren zone, 2010) (4) | 2010.03.28 |
2009년 SW 기술자 노임 단가 (2) | 2010.05.18 |
---|---|
devpia 글타래 - 허약한 개발자 / 개발자가 왜 나약하지? (2) | 2010.04.23 |
출근일기 - 20100406 (6) | 2010.04.06 |
주간회의 == 인민재판? (0) | 2010.04.06 |
출근일기 - 20100405 + 1주일 근황 (2) | 2010.04.05 |
# vi /usr/include/bits/dirent.hstruct dirent { #ifndef __USE_FILE_OFFSET64 __ino_t d_ino; __off_t d_off; #else __ino64_t d_ino; __off64_t d_off; #endif unsigned short int d_reclen; unsigned char d_type; char d_name[256]; /* We must not include limits.h! */ }; |
# vi /usr/include/bits/stat.hstruct stat { __dev_t st_dev; /* Device. */ unsigned short int __pad1; #ifndef __USE_FILE_OFFSET64 __ino_t st_ino; /* File serial number. */ #else __ino_t __st_ino; /* 32bit file serial number. */ #endif __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ __dev_t st_rdev; /* Device number, if device. */ unsigned short int __pad2; #ifndef __USE_FILE_OFFSET64 __off_t st_size; /* Size of file, in bytes. */ #else __off64_t st_size; /* Size of file, in bytes. */ #endif __blksize_t st_blksize; /* Optimal block size for I/O. */ #ifndef __USE_FILE_OFFSET64 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ #else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ #endif #ifdef __USE_MISC /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the |
#include <unistd.h> ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize); Return Value Upon successful completion, readlink() shall return the count of bytes placed in the buffer. Otherwise, it shall return a value of -1, leave the buffer unchanged, and set errno to indicate the error. [링크 : http://linux.die.net/man/3/readlink] |
The readlink function gets the value of the symbolic link filename. The file name that the link points to is copied into buffer. This file name string is not null-terminated; readlink normally returns the number of characters copied. The size argument specifies the maximum number of characters to copy, usually the allocation size of buffer. [링크 : http://www.gnu.org/s/libc/manual/html_node/Symbolic-Links.html] |
APPLICATION USAGE Conforming applications should not assume that the returned contents of the symbolic link are null-terminated. RATIONALE Since IEEE Std 1003.1-2001 does not require any association of file times with symbolic links, there is no requirement that file times be updated by readlink(). The type associated with bufsiz is a size_t in order to be consistent with both the ISO C standard and the definition of read(). The behavior specified for readlink() when bufsiz is zero represents historical practice. For this case, the standard developers considered a change whereby readlink() would return the number of non-null bytes contained in the symbolic link with the buffer buf remaining unchanged; however, since the stat structure member st_size value can be used to determine the size of buffer necessary to contain the contents of the symbolic link as returned by readlink(), this proposal was rejected, and the historical practice retained. [링크 : http://www.opengroup.org/onlinepubs/000095399/functions/readlink.html] |
ubuntu 9.10 에서 APM + viewvc + cvsgraph 돌리기 (0) | 2010.04.28 |
---|---|
enscript (0) | 2010.04.28 |
pwd(getcwd), cd(chdir) (4) | 2010.04.19 |
wget (4) | 2010.04.10 |
/dev의 major minor에 대하여 (0) | 2010.04.08 |
static int openredirect(union node *redir) { char *fname; int f; switch (redir->nfile.type) { case NFROM: fname = redir->nfile.expfname; f = open(fname, O_RDONLY); if (f < 0) goto eopen; break; case NFROMTO: fname = redir->nfile.expfname; f = open(fname, O_RDWR|O_CREAT|O_TRUNC, 0666); if (f < 0) goto ecreate; break; case NTO: /* Take care of noclobber mode. */ if (Cflag) { fname = redir->nfile.expfname; f = noclobberopen(fname); if (f < 0) goto ecreate; break; } /* FALLTHROUGH */ case NCLOBBER: fname = redir->nfile.expfname; f = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666); if (f < 0) goto ecreate; break; case NAPPEND: fname = redir->nfile.expfname; f = open(fname, O_WRONLY|O_CREAT|O_APPEND, 0666); if (f < 0) goto ecreate; break; default: #if DEBUG abort(); #endif /* Fall through to eliminate warning. */ case NTOFD: case NFROMFD: f = -1; break; case NHERE: case NXHERE: f = openhere(redir); break; } return f; ecreate: ash_msg_and_raise_error("cannot create %s: %s", fname, errmsg(errno, "nonexistent directory")); eopen: ash_msg_and_raise_error("cannot open %s: %s", fname, errmsg(errno, "no such file")); }
$ cat target/etc/inittab # Example Busybox inittab ::sysinit:/etc/init.d/rcS ttyAS0::askfirst:/bin/sh ttyAS1::askfirst:/bin/sh ::ctrlaltdel:/sbin/reboot ::shutdown:/sbin/swapoff -a ::shutdown:/bin/umount -a -r ::restart:/sbin/init |
busybox tftp (0) | 2013.06.18 |
---|---|
busybox - setconsole (0) | 2011.10.21 |
busybox ps는 BSD 스타일? (0) | 2010.01.12 |
ifup / ifdown 을 통한 static <-> dhcp 변환 (0) | 2009.12.29 |
udhcpd 용 interface 예제 (0) | 2009.12.23 |
#include <iconv.h> iconv_t iconv_open(const char *tocode, const char *fromcode); size_t iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); |
#include "stdio.h" #include "string.h" #include "iconv.h" #include "errno.h" #define BUFF_SIZE 64 int main() { iconv_t cd = iconv_open("UNICODE", "UTF-8"); if (cd == (iconv_t)(-1)) { perror("iconv_open"); return 0; } char inBuf[BUFF_SIZE] = "Hello world"; int inBufSize = sizeof(inBuf); char outBuf[BUFF_SIZE]; int outBufSize = sizeof(outBuf); memset(outBuf, 0, outBufSize); // convert size_t readBytes = strlen(inBuf); size_t writeBytes = sizeof(outBuf); char* in = inBuf; char* out = outBuf; printf("readBytes:%d writeBytes:%d\n",readBytes,writeBytes); if (iconv(cd, &in, &readBytes, &out, &writeBytes) == -1) { printf("failed to iconv errno:%d EILSEQ:%d\n", errno, EILSEQ); } else { int idx; printf("in:%x out:%x\n",in,out); printf("readBytes:%d writeBytes:%d\n",readBytes,writeBytes); for(idx = 0; idx < BUFF_SIZE; idx++) { printf("%03d %c %x\t\t", idx, inBuf[idx], inBuf[idx]); printf("%03d %c %x\n", idx, outBuf[idx], outBuf[idx]); } outBuf[writeBytes] = '\0'; } iconv_close(cd); return 0; }
iconv / gconv 사용시 주의사항(?) - 포팅시 유의사항 (0) | 2010.06.01 |
---|---|
iconv 라이브러리 위치 (0) | 2010.06.01 |
iconv() 함수 완전정복(?) (0) | 2010.04.23 |
linux iconv 테스트 (0) | 2010.04.20 |
iconv 유틸리티/프로그램 사용하기 (2) | 2010.04.19 |
$ cat test.str Hello world $ vi test.str 1 Hello world |
$ cat result.txt ▒▒Hello world $ vi result.txt 1 ÿþH^@e^@l^@l^@o^@ ^@w^@o^@r^@l^@d^@ 2 ^@ |
iconv / gconv 사용시 주의사항(?) - 포팅시 유의사항 (0) | 2010.06.01 |
---|---|
iconv 라이브러리 위치 (0) | 2010.06.01 |
iconv() 함수 완전정복(?) (0) | 2010.04.23 |
iconv() 함수 사용하기 (6) | 2010.04.20 |
iconv 유틸리티/프로그램 사용하기 (2) | 2010.04.19 |
[링크 : http://code.google.com/intl/ko-KR/apis/youtube/2.0/reference.html] |
[링크 : http://code.google.com/intl/ko-KR/apis/youtube/2.0/reference.html] |
youtube gdata api / fmt_map 관련 변경사항 (0) | 2010.07.31 |
---|---|
youtube api 변동으로 인한 content 태그 변경 (0) | 2010.05.13 |
youtube gdata 검색관련 (0) | 2010.04.20 |
youtube html5 (2) | 2010.04.17 |
Percent encoding = URL Encoding (0) | 2010.04.16 |
<openSearch:startIndex>1</openSearch:startIndex> <openSearch:itemsPerPage>25</openSearch:itemsPerPage> |
<link rel='previous' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos?start-index=1&max-results=25...'/> <link rel='next' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos?start-index=51&max-results=25...'/> [링크 : http://code.google.com/intl/ko-KR/apis/youtube/2.0/reference.html] |
youtube api 변동으로 인한 content 태그 변경 (0) | 2010.05.13 |
---|---|
youtube locale 관련 (0) | 2010.04.20 |
youtube html5 (2) | 2010.04.17 |
Percent encoding = URL Encoding (0) | 2010.04.16 |
유튜브 fmt 와 t 값 (0) | 2010.04.15 |
long getcwd(char *buf, unsigned long size); #include <unistd.h> int chdir(const char *path); int fchdir(int fd); |
#include "unistd.h" void main() { int ret; char buff[256]; getcwd(buff, 255); printf("%s\n",buff); ret = chdir("/etc"); getcwd(buff, 255); printf("%s\n",buff); } |
enscript (0) | 2010.04.28 |
---|---|
readlink() 와 심볼릭 링크, 그리고 inode(아이노드) (0) | 2010.04.20 |
wget (4) | 2010.04.10 |
/dev의 major minor에 대하여 (0) | 2010.04.08 |
gethostname() 과 gethostbyname() - difference of gethostname() and gethostbyname() (4) | 2010.04.05 |