mnt: Devpts options get corrupted on dump (v2)
mnt: Devpts options get corrupted on dump (v2)

The memcpy() in devpts_dump() just overwrites part of them.
Fix this and move the whole code into sub-routine for future.

v2: Fix off-by-one error spotted by Filipe.

Signed-off-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@parallels.com>
Acked-by: Filipe Brandenburger <46f5a0051bcaac06293374f80c77669d4919a80b@google.com>

LK4D4/criu,marcosnils/criu,tych0/criu,tych0/criu,fbocharov/criu,AuthenticEshkinKot/criu,marcosnils/criu,sdgdsffdsfff/criu,KKoukiou/criu-remote,KKoukiou/criu-remote,sdgdsffdsfff/criu,gablg1/criu,efiop/criu,gonkulator/criu,KKoukiou/criu-remote,biddyweb/criu,gablg1/criu,efiop/criu,marcosnils/criu,gonkulator/criu,ldu4/criu,gablg1/criu,biddyweb/criu,AuthenticEshkinKot/criu,tych0/criu,fbocharov/criu,KKoukiou/criu-remote,fbocharov/criu,kawamuray/criu,KKoukiou/criu-remote,ldu4/criu,fbocharov/criu,marcosnils/criu,eabatalov/criu,biddyweb/criu,svloyso/criu,sdgdsffdsfff/criu,marcosnils/criu,gonkulator/criu,sdgdsffdsfff/criu,LK4D4/criu,ldu4/criu,tych0/criu,AuthenticEshkinKot/criu,wtf42/criu,AuthenticEshkinKot/criu,gonkulator/criu,rentzsch/criu,eabatalov/criu,efiop/criu,kawamuray/criu,gonkulator/criu,tych0/criu,gablg1/criu,efiop/criu,eabatalov/criu,rentzsch/criu,fbocharov/criu,sdgdsffdsfff/criu,kawamuray/criu,gablg1/criu,ldu4/criu,svloyso/criu,LK4D4/criu,LK4D4/criu,KKoukiou/criu-remote,eabatalov/criu,kawamuray/criu,wtf42/criu,eabatalov/criu,biddyweb/criu,efiop/criu,rentzsch/criu,kawamuray/criu,rentzsch/criu,marcosnils/criu,biddyweb/criu,gablg1/criu,ldu4/criu,sdgdsffdsfff/criu,wtf42/criu,LK4D4/criu,eabatalov/criu,tych0/criu,gonkulator/criu,biddyweb/criu,ldu4/criu,rentzsch/criu,efiop/criu,svloyso/criu,wtf42/criu,kawamuray/criu,svloyso/criu,svloyso/criu,AuthenticEshkinKot/criu,wtf42/criu,AuthenticEshkinKot/criu,rentzsch/criu,wtf42/criu,fbocharov/criu,LK4D4/criu,svloyso/criu