lkml.org 
[lkml]   [2013]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] Drivers: hv: Add a new driver to support host initiated backup
On Tue, Mar 12, Olaf Hering wrote:

> On Tue, Mar 12, K. Y. Srinivasan wrote:
>
> > +static int vss_operate(int operation)
> > +{
> > + char *fs_op;
> > + char cmd[512];
> > + char buf[512];
> > + FILE *file;
> > + char *p;
> > + char *x;
> > + int error;
> > +
> > + switch (operation) {
> > + case VSS_OP_FREEZE:
> > + fs_op = "-f ";
> > + break;
> > + case VSS_OP_THAW:
> > + fs_op = "-u ";
> > + break;
> > + }
> > +
> > + sprintf(cmd, "%s", "mount | grep ^/dev/ | awk '{print $3 }'");
>
> I think this can be char cmd[] = "mount | awk '/^\/dev\/ { print $3'";

After thinking about this part, perhaps start a helper script which has
to provide as output the list of the mounted filesystems?

Olaf


\
 
 \ /
  Last update: 2013-03-14 11:01    [W:0.090 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site