Active Topics

 


Reply
Thread Tools
Posts: 567 | Thanked: 2,965 times | Joined on Oct 2009
#1
Can anyone help me understand what absolute_pathname in https://github.com/community-ssu/mae...sec_common.cpp is actually doing?
 
Posts: 75 | Thanked: 269 times | Joined on Aug 2012
#2
Looks like it's turning relative pathnames into absolute pathnames.
May be similar output to running realpath.
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#3
Yep.
And it checks for a given link, relative or absolute, and returns the full absolute path name where it points to (e.g. The hashed links in /etc/ssl/certs)
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 
Posts: 329 | Thanked: 422 times | Joined on Feb 2011 @ derpton
#4
I think OP wanted some help about HOW the code is doing that... It's easy to explain WHAT it does even if you just know the function name
 
ZogG's Avatar
Posts: 1,389 | Thanked: 1,857 times | Joined on Feb 2010 @ Israel
#5
i do not have enough C knowledge but this function tries to get full absolute(full) real(if it's symlink) path and sets it to pointer to_this. If function is successful you will get true as return code of the function and false if it fails.
Can you be more specific in what exact parts you need help with?
P.S. Do people still use "goto fail" ?
__________________
IRC nick on freenode — ZogG
imgrup
 
Reply


 
Forum Jump


All times are GMT. The time now is 15:36.