SEO Services
Home >> Webmaster Forums >> reading a readlink from a symbolic link

reading a readlink from a symbolic link


calsoft_pg said: "Hi, this is swanand. I want to write a program that identifies a symbolic link. and if the symbolic link gets deleted,the link should be displayed during the deletion. So i have made a change in the function : ------------------------------------------------------------------ static int ext2_unlink(struct inode * dir, struct dentry *dentry) { struct inode * inode = dentry->d_inode; struct ext2_dir_entry_2 * de; struct page * page; struct buffer_head *bh; struct ext2_inode *e_inode; const char *my_buffer=""; int err = -ENOENT; int temp; e_inode=my1_ext2_get_inode(inode->i_sb,inode->i_ino,&bh); if(inode->i_op->follow_link) { printk(KERN_ALERT "\nyou have deleted a symbolic link !"); temp=generic_readlink(dentry,my_buffer,50); printk(KERN_ALERT "\nThe path is %s. %d\n",my_buffer,temp); } de = ext2_find_entry (dir, dentry, &page); if (!de) goto out; err = ext2_delete_entry (de, page); if (err) goto out; inode->i_ctime = dir->i_ctime; ext2_dec_count(inode); err = 0; out: return err; } ---------------------------------------------------------------- This function is defined in the file /usr/src/linux-2.6.11/fs/ext2/namei.c file. But i am not able to read the link. Can anyone please tell me how is it possible to read the link???????? I would really really be very thankful to you if you can solve my problem. Thank you very much and happy new year."

Neutron2k said: "i'm not quite sure what your trying to acheive here but it looks like its in C to me. this is not a Stand Alone Development forum buddy, its a web development forum. However I may still be able to help but i'm not sure i understand your problem."

rickyjoreturns said: "is there anything you don't know that in any way relates to computers? :)"

Neutron2k said: "im self taught since i was 11/12 and i was programming in C at 13. I can pick up languages within a day or to usually and build systems very quickly. i'm by no means an expert in any one field tho. I'm sort of just at advanced on a lot of different levels if you know what i mean. I've dabbled in a lot of things programming, graphics (2d+3d) and animation, web dev, hardware building, system building repair and maintenence, operating systems, networking, gaming and game level design etc. computers rule my life. I've never been one of these people who go out drinking and clubbing and playing the field every night of the week. i rarley go out anymore. maybe 2-3 times a year socially. I love going out but it just costs a lot of money and is overly pointless half the time."

thepetemaster said: "n2k is right! I am self taught. the 1st computer i had is a win v.3! Thats old! I'm thriteen now. I now make websites and now starting to go into mysql and php!!!! Its a small world!!"

Neutron2k said: "good luck dude :) development is a long road to get on but you'll get there :)"

Sharky said: "theres too many website designers its becoming very populated! we should put people off :D"

edwin said: "[QUOTE=Sharky]theres too many website designers its becoming very populated! we should put people off :D[/QUOTE] kill them off!"