15#include <zypp-media/Mount>
33#define DELAYED_VERIFY 1
64 ERR <<
"Media url does not contain a device specification" << std::endl;
68 DBG <<
"Verify of " <<
_device <<
" delayed" << std::endl;
93 dev_name.asString().compare(0,
sizeof(
"/dev/")-1,
"/dev/"))
96 <<
" is not allowed" << std::endl;
104 <<
" is not a block device" << std::endl;
111 std::list<Pathname>
dlist;
114 std::list<Pathname>::const_iterator
it;
122 <<
" is a volume (disk/by-uuid link "
135 std::list<Pathname>
dlist;
138 std::list<Pathname>::const_iterator
it;
146 <<
" is a volume (disk/by-label link "
158 args.push_back(
"blkid" );
159 args.push_back(
"-p" );
160 args.push_back(
dev_name.asString() );
164 if (
cmd.close() != 0 )
166 ERR <<
cmd.execError() << endl
167 <<
"Specified device name " <<
dev_name
168 <<
" is not a usable disk volume"
200 DBG <<
"Verifying " <<
_device <<
" ..." << std::endl;
215 if(
ret.mediaSource &&
217 !
ret.attachPoint->empty())
219 DBG <<
"Using a shared media "
220 <<
ret.mediaSource->name
222 <<
ret.attachPoint->path
232 MountEntries entries(
manager.getMountEntries());
233 MountEntries::const_iterator
e;
234 for(
e = entries.begin();
e != entries.end(); ++
e)
240 if(
dev_path.compare(0,
sizeof(
"/dev/")-1,
"/dev/") == 0 &&
247 media->min_nr ==
dev_info.devMinor())
252 DBG <<
"Using a system mounted media "
280 if( !media->bdir.empty())
313 "Unable to verify that the media was mounted",
343 if(
am.mediaSource &&
am.mediaSource->iown)
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Execute a program and give access to its io An object of this class encapsulates the execution of an ...
std::vector< std::string > Arguments
std::string getQueryParam(const std::string ¶m, EEncoding eflag=zypp::url::E_DECODED) const
Return the value for the specified query parameter.
Wrapper class for stat/lstat.
const std::string & asString() const
String representation.
int readdir(std::list< std::string > &retlist_r, const Pathname &path_r, bool dots_r)
Return content of directory via retlist.
std::list< DirEntry > DirContent
Returned by readdir.
Easy-to use interface to the ZYPP dependency resolver.
std::string asString(const Patch::Category &obj)
#define ZYPP_CAUGHT(EXCPT)
Drops a logline telling the Exception was caught (in order to handle it).
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.