FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Studio User

 
 
LinkBack Thread Tools
 
Old 04-23-2010, 12:39 PM
Martin Sivak
 
Default loader: strip trailing slash character from stage2= URL.

Ack.

--
Martin Sivák
msivak@redhat.com
Red Hat Czech
Anaconda team / Brno, CZ

----- "Ales Kozumplik" <akozumpl@redhat.com> wrote:

> previously, the URL could only be "*.img" anyway. If we are going to
> be
> mounting directories, let's have the URL in the same form all the
> time.
> ---
> loader/method.c | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/loader/method.c b/loader/method.c
> index d6f83e6..1937b5a 100644
> --- a/loader/method.c
> +++ b/loader/method.c
> @@ -59,6 +59,15 @@
> /* boot flags */
> extern uint64_t flags;
>
> +static void stripTrailingSlash(char *path) {
> + size_t len = strlen(path);
> +
> + if (len == 0)
> + return;
> + if (path[len-1] == '/')
> + path[len-1] = '';
> +}
> +
> int umountLoopback(char * mntpoint, char * device) {
> int loopfd;
>
> @@ -508,6 +517,7 @@ void setStage2LocFromCmdline(char * arg, struct
> loaderData_s * ld) {
> &(((struct nfsInstallData *)ld->stage2Data)->host),
> &(((struct nfsInstallData *)ld->stage2Data)->directory),
> &(((struct nfsInstallData *)ld->stage2Data)->mountOpts));
> + stripTrailingSlash(((struct nfsInstallData
> *)ld->stage2Data)->directory);
> } else if (!strncmp(arg, "nfsiso:", 7)) {
> ld->method = METHOD_NFS;
> ld->stage2Data = calloc(sizeof(struct nfsInstallData *), 1);
> --
> 1.6.6
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 10:31 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org