Q: Have you heard about the object-oriented way to become wealthy?
A: Inheritance
(아마도 답에 대한 질문을 만든듯... 그래도 재밌다. :) )
At the moment, the vmware-tools provided with workstation 6.0.2 do not compile under Ubuntu Gutsy 7.10.
Only one module fails: vmhgfs. This module allow one to share a folder on the host with the guest.
This tutorial will show the few changes required in order to be able to compile this module, and therefore ease file sharing between the host and the guest.
The original error that one might get while compiling the tools will have the following:
CC [M] /tmp/vmware-config0/vmhgfs-only/filesystem.o
/tmp/vmware-config0/vmhgfs-only/filesystem.c: In function ‘HgfsInitFileSystem':
/tmp/vmware-config0/vmhgfs-only/filesystem.c:582: error: too few arguments to function ‘kmem_cache_create'
/tmp/vmware-config0/vmhgfs-only/filesystem.c:593: error: too few arguments to function ‘kmem_cache_create'
In this tutorial, I will consider that the vmware-tools's .tar.gz is already untarred in your home dir and that user can gain root credential with sudo.
First of all, you need to get in the working directory of vmware-tools:
$ cd ~/vmware-tools-distrib
Then, we will back up the old vmhgfs.tar:
$ mv lib/modules/source/vmhgfs.tar vmhgfs.tar.orig
Now, we untar vmhgfs.tar.orig:
$ tar -xvf vmhgfs.tar.orig
Now edit vmhgfs-only/compat_slab.h:
$ vim vmhgfs-only/compat_slab.h
and change:
if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) || defined(VMW_KMEMCR_HAS_DTOR)
with
if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 22) || defined(VMW_KMEMCR_HAS_DTOR)
Finally, re-tar vmhgfs-only directory in lib/modules/source/vmhgfs.tar:
$ tar -cvf lib/modules/source/vmhgfs.tar vmhgfs-only
Then copy this new tar into /usr/lib/vmware-tools/modules/source/ :
$ sudo cp lib/modules/source/vmhgfs.tar /usr/lib/vmware-tools/modules/source/vmhgfs.tar
That's it, now you can re-run the tools config script:
$ sudo vmware-config-tools.pl
이글에도 사소한 버그가 있었다.
compat_slab.h 는 vmhgfs-only/share/ 밑에 있다.
(이정도는 애교)
어쨋든, 상황종료.
보통 ext3로 포맷을 하게되면, 시간이 무지 오래 걸린다.
지금 하고 있는 프로젝트에서 사용하려고 하니, 하세월이다.
KLDP에 있는 Quick Format은 ext3가 아닌 ext2용 inode를 만들기 때문에, 금방 끝나긴 하지만, ext2로 mount해야한다.
더 좋은 방법(?)은 생성되는 inode의 수를 줄여준다. 물론, 파일을 많이 만들 수는 없다. 하지만 금방 끝난다...
1. e2fsprogs의 소스를 받아서,
2. misc/mke2fs.c의 main()위에 있는 PRS()함수를 찾는다.
3. 거의 아랫부분의 param.s_inodes_count의 값을 계산하기 바로 위에,
4. num_inodes = 1; reserved_ration = 1; 값을 강제적으로 세팅했다.
5. 결론적으로 원래 만들어 져야 할 inode의 수보다 1/512배 만큼의 inode가 만들어진다.
포맷도 빠르고, ext3를 사용할 수 있어서 좋다.
단점은 파일을 많이 만들 수 없다는 것...
MFC 버전 | Visual C++ 버전 |
---|---|
1.0 |
Microsoft C/C++ 7.0 |
2.0 |
Visual C++ 1.0 |
2.5 |
Visual C++ 1.5 |
3.0 |
Visual C++ 2.0 |
3.1 |
Visual C++ 2.1 |
3.2 |
Visual C++ 2.2 |
4.0 |
Visual C++ 4.0 |
4.1 |
Visual C++ 4.1 |
4.2 |
Visual C++ 4.2 |
4.21(mfc42.dll) |
Visual C++ 5.0 |
6.0(mfc42.dll) |
Visual C++ 6.0 |
7.0(mfc70.dll) |
Visual C++ .NET 2002 |
7.1(mfc71.dll) |
Visual C++ .NET 2003 |
8.0(mfc80.dll) |
Visual C++ 2005 |
정상적인 도메인네임을 구분하기 위해서 정확한 룰을 찾아봤다.
다음의 규칙을 만족해야만 한다.
1. 문자, 숫자, "-"(hyphen) 만을 사용할 수 있다.
2. sub domain의 구분은 "."으로 한다.
3. 시작과 끝은 반드시 문자나 숫자여야 한다. ("-"이 처음이나 끝에 올 수 없다)
4. 전체 길이(sub domain의 전체를 포함)는 64자까지 허용한다.
5. 대소문자를 구분하지 않는다.
의외로 단순하다.
이 조건으로는 IP Address도 포함 할 수 있으므로, 오류검사하는 데 사용하면 좋겠다.
(참고: 구글검색결과)