5 #include <syslinux/config.h>
6 #include <klibc/compiler.h>
14 char *getcwd(char *buf
, size_t size
)
16 static com32sys_t reg
;
19 reg
.eax
.w
[0] = 0x001f;
20 __intcall(0x22, ®
, ®
);
21 pwdstr
= MK_PTR(reg
.es
, reg
.ebx
.w
[0]);
22 if ((strlen(pwdstr
) < size
) && (buf
!= NULL
)) {