linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* help with sys_stat
@ 2006-01-28 15:01 Niel A
  2006-01-28 10:41 ` Frank Kotler
  0 siblings, 1 reply; 2+ messages in thread
From: Niel A @ 2006-01-28 15:01 UTC (permalink / raw)
  To: linux-assembly@vger.kernel.org

hey guys! it's me again (with another useless program! hehehehe)

actually.. i have two problems.. how to use struc in nasm.. and how to determine if a file is a directory...

i'm totally clueless about this .. so i used struc straightforward in segment. bss based on struct stat in /usr/include/asm/stat.h

segment .bss
struc stat
	.st_dev	resw		1
	-- snip --
endstruc

? but somehow, i think that i should make a struc somewhere at the beginning .. like a prototype of some sort and use it's name in segment .bss intead.

so far, i have a filename in edi and i call stat like ..
	mov eax, 106	; stat
	mov ebx, edi	; file
	mov ecx, stat
	int 80h

any suggestions on this one ? i'm reading asmutil's "rm" alongside making my own program.. but i'm only interested in determining if a given filename is a directory or not. do i also have to deal with trailing slashes in directory names?? 

tidings,
- niel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-28 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-28 15:01 help with sys_stat Niel A
2006-01-28 10:41 ` Frank Kotler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).